How to create a terminal use only account in MacOSX?

I want to create a user(say, hera) that can only be used in terminal. That is this user does not appear in the Mac welcome screen. This user can be su - hera by other users.

Can I do this and how?


Solution 1:

I echo the comments above. I'm not sure why you would want to bother hiding the user, why not just have a single admin account, making everyone else "standard" accounts and use sudo in the CLI (Command Line Interface - "Terminal.app") if you need to.

Anyway, here is the Apple tech article on creating hidden users and/or just hiding users from the login window:

Set the Login window to display name and password fields

In the Users & Groups preferences pane (Accounts pane in Mac OS X v10.6 and earlier), click Login Options, then select "Display login window as: Name and password".

With this enabled, no user accounts are listed in the Login window.

If changing the Login Window to only display the name and password fields does not meet your needs, then you can use the following steps in this article to hide a user account.

Add users to the HiddenUsersList (advanced)

With Mac OS X v10.4 and later you can hide users from the Login window by adding them to the HiddenUsersList array in the /Library/Preferences/com.apple.loginwindow.plist file. The following command will hide the users "mei" and "anne" from the Login window:

sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add mei anne

Note: These users will still appear in the Accounts (Mac OS X v10.6 and earlier) or Users & Groups (OS X Lion) pane in System Preferences.

Source: http://support.apple.com/kb/HT5017