Home Forums Software InstaDMG Hide user on Accounts Preference Pane

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #376910
    jasonkstupski
    Participant

    Hey all,

    I’m using createUser.pkg to create our admin user for our images, and I used the “hidden” option to keep the user from appearing in the login window. However, you can still see the created user in the Accounts System Preferences Pane (including being able to delete that user if you’re a local admin).

    Is there a way to hide the user from appearing in that Accounts Pane?

    Thanks,
    Jason

    #376951
    ttpedersen
    Participant

    Here’s how I do it:

    In USERDATA besides setting hide_user=1, I set the uid to 499.

    Then I have modified the postflight script. After the if “[ $hide_user -eq 1 ]; then” expression, I added
    [code]/usr/bin/defaults write “${TARGET_DIR}/Library/Preferences/com.apple.loginwindow” Hide500Users -bool TRUE[/code]
    This will hide the user in the Accounts pane.

    #376971
    jasonkstupski
    Participant

    Thanks for the tip.

    I set that up to change the uid, but now when I boot up, the user isn’t hidden from the login window or the accounts pane.

    I checked com.apple.loginwindow, and it doesn’t have the proper values set. Perhaps I made a mistake in editing the postflight script inside createUser.pkg?

    Here’s what I did:

    [code]if [ $hide_user -eq 1 ]; then
    /usr/bin/defaults write “${TARGET_DIR}/Library/Preferences/com.apple.loginwindow” HiddenUsersList -array $shortname
    /usr/bin/defaults write “${TARGET_DIR}/Library/Preferences/com.apple.loginwindow” Hide500Users -bool TRUE
    fi[/code]

    Let me know if I did anything incorrectly.

    Thanks!
    Jason

    #376984
    ttpedersen
    Participant

    Strange. I have the exact same lines in the postflight script as you.

    Have you double checked the USERDATA file?

    Apart from setting the uid and the hidden option in USERDATA, I only made the aforementioned change in the postflight script.

    #377018
    knowmad
    Participant

    check:
    [url]http://forums.macosxhints.com/archive/index.php/t-80670.html[/url]
    for all the details on hiding users… more than you wanted to know
    (also can be found in somewhat condensed form but missing certain details at: [url]http://www.macosxhints.com/article.php?story=20080127172157404&query=hide%2Busers%2Bin%2Bleopard[/url] )

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

Comments are closed