[Next] [Previous] [Up] [Top] [Contents]

13.1.2 SunOS 5.X Adding users

To add new users from the command line use useradd. This updates the files /etc/passwd and /etc/shadow, and if necessary, /etc/group, and creates the home directory. You would execute this command in the form "useradd [options] login-id", e.g.:

# useradd -u 1001 -g staff -d /export/home/frank -s /usr/bin/csh -d "Frank G Fiamingo" -m \
-k /etc/skel frank

where the options used above refer to:

u uid number
g group name
d home directory name
s path to the shell
m make the home directory
k path to the skeleton dot files

The last step is to provide the user with a password, using the passwd command.

Unix System Administration - 8 AUG 1996
[Next] [Previous] [Up] [Top] [Contents]