AFP548 Changing the world one server at a time.

Instauser, Being Part of the “admin” Group, OS X Registration

Home › Forums › Software › InstaDMG › Instauser, Being Part of the “admin” Group, OS X Registration

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #370931
    Patrick Fergus
    Participant

    I’m tweaking the Instauser package for my needs, changing the admin’s username, making it copy in an already-hashed password, and adding the local admin to the admin group. Unfortunately, when I add the Instauser-created user to the admin group, OS X offers to register OS X with Apple upon login. This is not the usual pre-login Setup Assistant (which includes the Migration Assistant, date and time, time zone, etc), but rather the last few steps where you are asked for your name, address, and email address. It’s as if Leopard believes that I’ve performed an upgrade installation from a previous major release of OS X.

    I’ve tested using an unmodified Instauser package with the exception of adding the user “instadmg” to the admin group by hand since the NetInfo-based commands in the example package don’t work in Leopard. The Registration doesn’t run unless the user logging in is an admin.

    Does anyone know where the file which controls this? I don’t believe it’s .AppleSetupDone.

    #370932
    Patrick Fergus
    Participant

    Found it.

    /Library/Receipts/.SetupRegComplete

    A zero byte file, with permissions/ownership of root:admin 400 is sufficient.

    #370937
    Patrick Fergus
    Participant

    (Joel–you probably know this already, this is for anyone else who’d read this thread)

    You’d also need to:

    1. Get the user into the admin group. It can be handled by dscl inside the instauser script:

    /usr/bin/dscl . -append Groups/admin GroupMembership localadmin

    or by replacing the admin group plist with an already-set-up admin.plist:

    /private/var/db/dslocal/nodes/Default/groups/admin.plist

    2. Disable the regular OS X Setup Assistant by placing a zero-byte file with ownership and persmissions of root:wheel 600 here:

    /private/var/db/.AppleSetupDone

    3. Provide a home directory

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.