Mac OS X Tip: Disable (Hide) User Accounts by Changing their Login Shell
November 21, 2008 | Leave a Comment
In Mac OS X Leopard (10.5.x), you can disable (hide) user accounts by doing the following…
Assumptions:
You have created 3 user accounts. For our testing purposes, we will create the following 3 user accounts.
- user00 with administrator privileges
- user01 with standard privileges
- user02 as a test account with either of the above privileges [account to be disabled]
Procedure to Disable an Account to Make it Unavailable:
Log in to your Leopard machine with either user00 or user01; preferably user01.
GUI:
1. Open System Preferences then click on Accounts
2. If necessary unlock the preference pane then right-click on the user account of interest (user02) and click on Advanced Options…
3. Change the value of the Login Shell to /usr/bin/false then click on OK
4. Restart the computer for the settings to take effect
Command Line:
1. Open Terminal.app from /Applications/Utilities then type su user00
- Enter the password for user00 when prompted
2. Type sudo dscl . -create /Users/user02 UserShell /usr/bin/false [the dot (".") specifies the local domain]
- Enter the password for user00 when prompted
3. Restart the computer for the settings to take effect
Procedure to Re-Enable an Account to Make it Available:
Log in to your Leopard machine with either user00 or user01; preferably user01.
Command Line:
1. Open Terminal.app from /Applications/Utilities then type su user00
- Enter the password for user00 when prompted
2. Type sudo dscl . -create /Users/user02 UserShell /bin/bash [the dot (".") specifies the local domain]
- Enter the password for user00 when prompted
3. Restart the computer for the settings to take effect
Print User Account Properties to Verify your Work:
Log in to your Leopard machine with either user00 or user01; preferably user01.
Command Line:
1. Open Terminal.app from /Applications/Utilities then type su user00
- Enter the password for user00 when prompted
2. Type sudo dscl . -read /Users/user02 [the dot (".") specifies the local domain]
- Enter the password for user00 when prompted
Note:
dscl is the Directory Service command line utility
Comments
You must be logged in to post a comment.
