- Home Page
Categories
Archives
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- June 2011
- May 2011
- April 2011
- February 2011
- January 2011
- December 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- February 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- June 2006
- May 2006
- April 2006
- February 2006
- November 2005
- October 2005
- September 2005
- June 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
Daily Archives: May 8, 2006
First Mac Server Update No# 1
As many of you may have seen from our home page, we have just release our first Apple Mac Server version of PaperCut NG. About 30 majority Mac sites (mostly in education) expressed an interest in the testing program prior to release, and we’ve had a lot more download and contribute since the public beta release.
A mistyped GCC compiler option caused problems with the 6.2.3472 build on PowerPC based systems. We quickly re-released on Saturday night with this issue addressed.
The feedback so far has been great. Also thanks for all the compliments. Some examples:
“I must say the product is exceptional. I have had no problems whatsoever. “
“The app is great, stable and all the functionality is there. The notifications are working well and the importing of users for OD was very fast. “
One tester suggested that we should update the install process so the “papercut” host user is created automatically upon install. We’ve reworking the postflight install script in the installer so it creates the user in the local NetInfo domain using the dscl tool.
One of the frustrating aspects of using dscl to create the user is that you need to explicitly define the user’s uid (unique ID). How do you determine a free UID on the Mac? I took a look at a few other scripts and program installers. The only examples I could find used hardcoded numbers! I suppose in the hope that they’re not already in use. I decided that the best way was to exec Perl and do a quick scan using getpwuid looking for a free slot. Here is the relevant section in the preflight script:
#
# Add the host user account if required
#
if ! `id ${UNIX_USERNAME} >/dev/null 2>/dev/null`; then
echo "Creating account for ${UNIX_USERNAME}" >> $install_log
#
# Find first available UID between 101 and 499.
# We should probably try below 100 but I'd like to stay out of the Apple range
#
uid=`perl -e '
my $t = 101;
while ($t > $install_log
echo "${msg}" 1>&2
exit 1
fi
dscl . create /groups/${UNIX_USERNAME}
dscl . create /groups/${UNIX_USERNAME} name ${UNIX_USERNAME}
dscl . create /groups/${UNIX_USERNAME} passwd "*"
dscl . create /groups/${UNIX_USERNAME} gid ${uid}
dscl . create /users/${UNIX_USERNAME}
dscl . create /users/${UNIX_USERNAME} RealName "${APP_NAME} Host User"
dscl . create /users/${UNIX_USERNAME} UniqueID ${uid}
dscl . create /users/${UNIX_USERNAME} shell /bin/bash
dscl . create /users/${UNIX_USERNAME} NFSHomeDirectory "${dest}"
dscl . create /users/${UNIX_USERNAME} PrimaryGroupID ${uid}
fi
The recommended practice, and the behaviour seen when creating users via System Preferences->Accounts, is for standard users to be created at UID 500 and above. 100 and below are reserved for Mac OS X system and process accounts. I’ve started our search for a UID between 101 and 499 and this should be a pretty safe bet.
We’d like to get some good testing done on this… for example, does it work OK with all systems linking into external user sources such as Open Directory? If you do experience any problems, please let us know. Also note that the code first checks to see if the user exists. This means that advanced administrators who would prefer to create their own papercut host user, can do so prior to the install.
The latest Mac build is 3481. Please keep the feedback coming!
Posted in Releases
Comments Off