adduser \- procedure for adding new users
A new user must choose a login name, which must not already appear in
An account can be added by editing a line into the passwd file,
with no password given, and giving a user and group id for the
account. User id's should be distinct across a system, since they
are used to control access to files. Typically, users working on
similar projects will be put in the same group. Thus at UCB we have
groups for system staff, faculty, graduate students, and a few special
groups for large projects. System staff is group ``10'' for historical
reasons, and the super-user is in this group. The
program looks at your user and group id before it lets you become
the super-user, and should implement whatever policy you choose to administer
for limiting access to super-user privileges.
A skeletal account for a new user ``ernie'' would look like:
ernie::235:20:& Kovacs,508E,7925,6428202:/mnt/grad/ernie:/bin/csh
The first field is the login name ``ernie''. The next field is the
encrypted password which is not given and can be initialized using
The next two fields are the user and group id's.
Traditionally, users in group 20 are graduate students and have account
names with numbers in the 200's.
The next field gives information about ernie's real name, office and office
This information is used by the
From this information we can tell that ernie's real name is
``Ernie Kovacs'' (the & here serves to repeat ``ernie'' with appropriate
capitalization), that his office is 508 Evans Hall, his extension
is x2-7925, and this his home phone number is 642-8202.
program if necessary to allow different information to be encoded in
this field. The UCB version of finger knows several things particular
to Berkeley \- that phone extensions start ``2\-'', that offices ending
in ``E'' are in Evans Hall and that offices ending in ``C'' are in Cory Hall.
The final two fields give a login directory and a login shell name.
Traditionally, user files live on the file system
and there are subdirectories there for each group of users, i.e.:
``/mnt/staff'' and ``/mnt/prof''.
The login shell will default to ``/bin/sh'' if none is given.
Most users at Berkeley choose ``/bin/csh'' so this is usually specified here.
It is useful to give new users some help in getting started, supplying
them with a few skeletal files such as
if they use ``/bin/sh'', or
if they use ``/bin/csh''.
``/usr/skel'' contains skeletal definitions of such files.
New users should be given copies of these files which, for instance,
automatically at each login.
/etc/passwd password file
/usr/skel skeletal login directory
passwd(1), finger(1), chsh(1), chfn(1), passwd(5)
We don't say how to lock out the password file so you can't get messed
while you are editing it.
We currently just don't worry about this.
The trick is to make a file ``/etc/ptmp'' so that
``Temporary file busy \- try again'', and to remove it when you are done.