- This topic has 4 replies, 3 voices, and was last updated 17 years, 2 months ago by
knowmad.
-
AuthorPosts
-
August 20, 2009 at 4:29 pm #376910
jasonkstupski
ParticipantHey 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,
JasonAugust 25, 2009 at 8:03 am #376951ttpedersen
ParticipantHere’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
/usr/bin/defaults write "${TARGET_DIR}/Library/Preferences/com.apple.loginwindow" Hide500Users -bool TRUEThis will hide the user in the Accounts pane.
August 26, 2009 at 4:52 pm #376971jasonkstupski
ParticipantThanks 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:
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 fiLet me know if I did anything incorrectly.
Thanks!
JasonAugust 27, 2009 at 7:38 am #376984ttpedersen
ParticipantStrange. 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.
August 31, 2009 at 8:33 pm #377018knowmad
Participantcheck:
http://forums.macosxhints.com/archive/index.php/t-80670.html
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: http://www.macosxhints.com/article.php?story=20080127172157404&query=hide%2Busers%2Bin%2Bleopard ) -
AuthorPosts
- You must be logged in to reply to this topic.