First, create the account the screen
session runs as (say it's called screenimage
), as well as a group of users allowed to use it (say screenusers
):
adduser --system --group screenimage
addgroup --system screenusers
Then for each user allowed to use it, add them to the screenusers
group:
adduser USER screenusers
Then, add approved users to /etc/sudoers
: run visudo
and add the line
%screenusers ALL = (screenimage) /usr/bin/screen
ETA: To address the other answers on this post: the --system
creates accounts with no shell or password. The sudoers
line means that the users are clamped to running screen
, as the screenimage
user only.
Do nothing. Stick with the default unless there is a valid reason not to.
I see you mention setting up a new unix developer on a Mac. If this developer has any Mac experience, he'll be used to the default and will probably get confused if you've customized things. If you're writing software that ships out to customers, the customer will (usually) have the default configuration and so trying to debug on a system that is "unfamiliar" (i.e. not your comfy customized environment) can be very frustrating.
If (like me) you work with many different machines and operating systems you quickly learn the defaults for that system, what keyboard shortcuts are portable between systems, standard commands for each OS, etc.
What you really need to do here is get a new machine, see what doesn't work (looks like UTF-8 support is fine, I just checked on my Mac) and see if there are any valid reasons for making changes. Developers have their own preferences when it comes to the command line and really don't appreciate being forced into using what someone else thinks is an "ideal setup". It might be ideal for you, but Apple are pretty damn good at figuring out sensible defaults.
The only thing I'd really change by default when setting up a new Mac, is making the Tab key cycle through all controls (including buttons) rather than just text boxes and lists. I know it's not terminal-related, but it does make a huge difference for us keyboard junkies who rarely lift their hand to use a mouse :)
Keyboard & Mouse > Keyboard Shortcuts > Full keyboard access > All Controls
Best Answer
Use the dscl command. This example would create the user "luser", like so:
You can then use passwd to change the user's password, or use:
You'll have to create /Users/luser for the user's home directory and change ownership so the user can access it, and be sure that the UniqueID is in fact unique.
This line will add the user to the administrator's group: