- This topic has 1 reply, 2 voices, and was last updated 18 years, 4 months ago by
thomasb.
-
AuthorPosts
-
June 27, 2008 at 3:17 pm #373246
calloway
ParticipantHi!
I attempted to customize the instauser scripts, following the directions I found in a different post here. However, when I add the resulting package to my install train, run instadmg, and then restore the resulting image to a test volume, I get an unbootable copy of OS X. It begins to load the kernel, then reboots. I’ve tried booting in verbose mode, but nothing jumps out; also there is no crash or panic logs.Here are the steps that I took to customize it. I want to end up with a user called “remote” that has my own password. Can someone please take a look at what I have documented here, and let me know where I am going wrong?
Thanks!
Instauser Documentation
1. Modified /Library/Startupitiems/instauser/instauser as follows:
#Make the home
/usr/bin/ditto /System/Library/User\ Template/English.lproj/ /Users/remote
/usr/sbin/chown -R remote:staff /Users/remote#Remote Registration
touch /var/db/.AppleSetupDone#Supress Upgrade Style registration
touch /Library/Receipts/.SetupRegComplete2. Modified /Library/Startupitems/StartupParameters.plist as follows:
{
Description = “Auto User Creation”;
OrderPreference = Last;
Provides = (
remote
);
Requires = (
Network,
DirectoryServices
);
}3. Changed /var/db/dslocal/nodes/Default/groups/admin.plist as follows:
root
remote
4. Re-named /var/db/dslocal/nodes/Default/groups/users/instadmg.plist to ‘remote.plist’ and modified as foolows:
_writers_LinkedIdentity
remote
_writers_UserCertificate
remote
_writers_hint
Mohawk Mac Support Remote User
_writers_jpegphoto
remote
_writers_passwd
entered password I wanted to use here.
_writers_picture
remote
_writers_realname
remote
authentication_authority
;ShadowHash;
generateduid
“9BB9BC05-34B5-4A0E-8DEC-3855D3183954
gid
20
hint
home
/Users/remote
name
remote
passwd
********
#Did not modify this line
picture
/Library/User Pictures/Fun/Fortune Cookie.tif
realname
remote
shell
/bin/bash
uid
499
#Yes, I want him hidden
5. Used a php script found on afp548 called shadowhash for the purpose of getting the has right. Used the current GUID to generate a hash for the specific password that I wanted to use. Since this password consists of special characters, I had to use quotes, such that:
./shadowHash “password”>””9BB9BC05-34B5-4A0E-8DEC-3855D3183954”
Replaced /var/db/shadow/hash with the newly created has file.
6. Used packagemaker to build a package based on now modified Archive folder. (Dragged it in and built.)
July 1, 2008 at 8:50 am #373276thomasb
Participantcalloway wrote:
Hi!
I attempted to customize the instauser scripts, following the directions I found in a different post here. However, when I add the resulting package to my install train, run instadmg, and then restore the resulting image to a test volume, I get an unbootable copy of OS X. It begins to load the kernel, then reboots. I’ve tried booting in verbose mode, but nothing jumps out; also there is no crash or panic logs.I had a smiliar problem with Instauser 10.5. The problem I had was that the var folder was overwritten (it could not see the symlink to /private/var). It sounds like you have the same problem. This must be a bug with Instauser 10.5.
The problem is that the var folder is a symlink to /private/var. Just put your var folder inside a private folder before adding it to your package, and you should be good to go.
It should look like this, when issuing the following command on your package:
lsbom -fs `pkgutil --bom /path/to/your/package.pkg`That should give you an output simliar to this.
./Library/StartupItems/instauser/._instauser ./Library/StartupItems/instauser/StartupParameters.plist ./Library/StartupItems/instauser/instauser ./private/var/db/dslocal/nodes/Default/groups/admin.plist ./private/var/db/dslocal/nodes/Default/users/admin.plist ./private/var/db/shadow/hash/LONG-STRING-OF-CHARACTERSAn other thing to be aware of, is that you need to get the permissions for your StartupItem correct. PackageMaker is not able to get it exactly right, when clicking Apply Recommendations.
folder (instauser): root/wheel : drwxr-xr-x (755) script: root/wheel : -rwxr-xr-x (755) StartupParameters.plist: root/wheel : -rw-r--r-- (644)http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/Articles/StartupItems.html (see Startup Item Permissions)
You can make a new user account in System Preferences, and just copy the right folders/files, if you want to make your account the GUI-way. Then just distribute it the way it is done in Instauser 10.5 (remember /private/var).
Hope this helps.
-
AuthorPosts
- You must be logged in to reply to this topic.