Home Forums Software InstaDMG How to enable “Guest Account” with InstaDMG or from the CLI

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #375983
    melmaninga
    Participant

    I have been successfully using InstaDMG for sometime. Thank you very much to afp548! It’s made life so much easier.

    Depending upon my requirements, I make some modifications for my image during the InstaDMG build process. Some modifications I make using a “first boot” script.

    I would like to add the ability to enable the guest account for an image. I have played with quite a few options, including:

    • applying local mcx to change the preference pane setting.
    • adding a guest user using createUser
    • adding a guest user by adding a plist to /var/db/dslocal/nodes/Default/users and /var/db/shadow/hash.

    None of these has worked, successfully.

    How do you enable the guest account from the CLI?

    Furthermore, can a package be created that will enable the guest account using InstaDMG?

    #375984
    larkost
    Participant

    The best way of doing this is to:

    1) Install PackageMaker (part of the developer tools, and available in other forms as well, third-part tools are also useable)

    2) Use PackageMaker to create a new package, put in your organization in reverse-dns notion (ie: com.example.division).

    3) Projects -> Add Snapshot Package…

    4) Click on “Start”

    5) System Preferences -> Accounts, then authenticate (click on lock), click on Guest Account, check the “Allow guests to log in to this computer”, wait for it to be done

    6) Back to PackageMaker, click on “Stop”, wait for it to process, click on Next

    7) Weed out all the extraneous changes that got made while you were working. In this case that is everything but:
    [list]
    [*]/Library/Keychains/System.keychain
    [*]/private/etc/apache2/users/Guest.conf
    [*]/Users/Guest
    [*]
    [/list]

    8) Click on “Save” and then finish creating the package

    Note that this implies that your system keychain is the same on all your system, otherwise things get interesting. Unfortunately systemsetup does not offer this as a feature.

    This general procedure is useable to capture many system settings.

    #376033
    Patrick Fergus
    Participant

    Another option, depending on your OS X chops and willingness to roll up your sleeves and get dirty would be to let [url=http://www.fernlightning.com/doku.php?id=software:fseventer:start]fseventer[/url] watch what’s going on when you enable the guest account and figure out what’s happening under the covers. You [i]might[/i] be able to approximate the guest-enabling actions of OS X from the command line (via defaults (to set the right plists) or ditto (to create guest’s home)).

    And then again, OS X may be doing something so funky it can’t be readily duplicated. In that case, go with what larkost suggested.

    – Patrick

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

Comments are closed