help with my instauser script
Long since having given up any sort of pride, I am now asking questions on everything that does not work, as long as I have honestly tried to fix it.... so.....
This is my script (password changed to protect ME):
[code]#!/bin/bash
# This script will create a canned user.
# admin POC
# Josh Wisenbaker 7/13/2007 on my ass at SFO
#Make the account
/usr/bin/dscl . -create Users/admin
/usr/bin/dscl . -create Users/admin home /var/admin
/usr/bin/dscl . -create Users/admin shell /bin/bash
/usr/bin/dscl . -create Users/admin uid 11
/usr/bin/dscl . -create Users/admin gid 11
/usr/bin/dscl . -create Users/admin realname "Administrator"
/usr/bin/dscl . -create Groups/admin
/usr/bin/dscl . -create Groups/admin gid 11
/usr/bin/dscl . -passwd Users/admin "password"
/usr/sbin/dseditgroup -o edit -a admin -t user -n /NetInfo/DefaultLocalNode admin
#Make the home
/usr/bin/ditto /System/Library/User\ Template/English.lproj/ /var/admin
/usr/sbin/chown -R admin:admin /var/admin
#Configure ARD
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users admin -privs -all -restart -agent -menu
#Hide Admin User
/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow Hide500Users -bool YES
exit 0
[/code]
and this is the result:
The new image boots up fine, though it takes a very long time to go from boot screen to login window. It gets to log in window without running the lovely apple welcome script, but then I cannot login. I looked it over and as far as I can tell it is not creating the user/home folder. I am running the instauser script by replacing the original with mine in the file hierarchy and re-building the package using the existing PackageMaker Project. Just to double check I did this using the original script (no changes, just a build) and it worked flawlessly when run as a custom package.
What am I doing wrong?
For the heck of it I ran the script above on my test build machine under sudo and it did indeed create the user and the home drive and let me log in, and hise the home drive.
Once we figure out what is wrong here, I have questions about making this run on the unmounted image using the changes made in post [url]https://www.afp548.com/forum/viewtopic.php?showtopic=19941[/url] ... and how much of the other stuff I am doing can be done then too?
but thats all for another post.
(so much to learn so little time)