I would like to know how to hide my initial account (which is an administrator account) in the new Leopard 10.5 operating system.
In the old OS 10.4 this could be done very easily with the help of NetInfo Manager. You could change the UID to anything below 500 and secure your account, however in the new 10.5 OS this is no longer possible. NetInfo manager is no longer. Is there a script that can be entered via terminal that takes care of this?
In terminal you can check the user database with the following:
dscl . list /Users UniqueID
In raw UNIX you can check with the following:
cat /etc/passwd
I think also if you set the UID to under 500 it will hide it from the finder but not the loginwindow, if you use the previous line above with the sudo default write command it should do from both.
Sorry, I didn't fully read the original post. I take quick breaks from work and browse forums to clear my mind of something I am working on, and so as of a result I sometimes hastily answer things.
To answer your question about the user id, UID, you can set it by using the dscl command in OS X. For example, lets say you have a user called hidden administrator, short name hadmin
dscl . -create /Users/hadmin UniqueID 401
I am not exactly sure if you can modify a UID on a system, and I am willing to bet OS X doesn't like you doing that. I know in Work Group Manager in an OD environment you can't change the shortname nor can you change the UID once it has been generated. So, you may have to recreate your hidden user account.
I think I've found a solution for the hiding the admin account, but it took a little experimenting to get it to work. At first I had dropped the UID & GID to 102 and along with script: sudo dscl .-change /Users/pgsql UserShell "/bin/bash" "/usr/bin
false" ... it hides the account, but weirdly locks you out at the login screen.
Things seem to be much smoother by dropping the UID to 499 and the GID to 501 along with the script: defaults write /Library/Preferences/com.apple.loginwindow Hide500Users -bool YES
This hides the account well with no problems. I'm still experimenting with a few other things, but this should do the trick.
I have a script that creates this now, the script is still with in testing phases so it may or may not work 100% please use at your own risk, and if you make any tweaks let me know to make it better.
Interesting redirection, I'd like to experiment with it and do a little more tweaking. thanks so much for your input. In addition to the Admin Account, I'm also thinking about the guest account which is below 200. Disabling it is not enough, it's a nice addition to Apple's new OS, but this poses possible questions if not regulated in a controlled environment.
This is going to sound ridiculous but I was testing on my first Mac and wanted to play around with this hidden user account feature. After following the notes on this thread and lowering the UID to below 500, I ran the terminal command stated above to add it to the Hidden list. Now, for the life of me, I can't figure out how to reverse the process so I can access the account again under Sys Preferences.
Any help would be greatly appreciated. I'm pulling my hair out in frustration.
You'll need to re-image more than likely. once the UID has been lowered (and machine restarted), the change is propagated throughout the OS and it can't be restored unless you re-image the HD with the OS again and start fresh. Don't perform this mod unless you're serious about managing your administrator account.
No need to reimage.
To reverse the situation,
sudo defaults delete /Library/Preferences/com.apple.loginwindow Hide500Users
This will make the account visible in the Accounts preference pane unless you had added the HiddenUsersList dealie someone else suggested, in which case:
sudo defaults delete /Library/Preferences/com.apple.loginwindow HiddenUsersList
should do the trick.
Log in as a different admin (create one if necessary?) and control+click the previously hidden user icon in Accounts pref pane and change the user account ID, and/or home folder location.
If you change the uid, you will need to chown the home folder to the new uid by:
sudo chown <adminusername> /path/to/home/folder
If you changed the home folder location, you'll either move the old home folder to the new location, or allow the system to create a new home folder when you log in as the previously hidden admin user (if you created a second admin account that you no longer need, delete the second admin account through Accounts pref pane) and dispose of the old home folder.
I hope that's helpful. It can all be scripted also (though I doubt there would be much call for that).