ADDUSER/RMUSER(8) BSD System Manager's Manual ADDUSER/RMUSER(8)NAME
adduser, rmuser - add or delete users from the system
SYNOPSISadduser [-dDv] [-c change_time] [-C class] [-e expire_time] [-g
primary_group] [-G gecos] [-h home_directory_basedir] [-H
home_directory] [-m home_directory_mode] [-p passwd] [-P
encrypted_passwd] [-s shell] [-S skeleton_dir] [-u uid]
[username...]
rmuser [-v] [username...]
DESCRIPTION
The adduser program adds or deletes users from the master password file,
passwd(5). When no arguments are provided, adduser or rmuser interac-
tively prompt the user for any necessary information. If all necessary
information for creating or deleting the user is provided on the command
line, the user will not be prompted at all.
The -v flag causes adduser or rmuser to display more information about
what it is doing.
adduser-d is synonymous with rmuser.
The other flags for adduser may be used to specify values for the various
fields in the password file entry. The fields and their meanings are:
-c change_time
Specifies the time(3) value (seconds since the epoch) for the
change time field in the password file entry. The behavior of
the password change time field isn't completely defined at this
time. A value of zero (the default) is recommended.
-C class
Specifies the login class for the user. If the class is not
specified, the password file entry will contain an empty field
and the user will end up using the default entry in
login.conf(5).
-e expire_time
Specifies the time(3) value (seconds since the epoch) for the ex-
pire time field in the password file entry. The behavior of the
expire time field isn't completely defined at this time. A value
of zero (the default) is recommended.
-g group
Specifies the primary group for the user. If this value is not
specified on the command line, the user will be prompted for the
value.
-G gecos
Specifies the complete value of the gecos field (including the
comma separated subfields). See passwd(5) for a complete de-
scription of this field. If no value is specified on the command
line, the user will be prompted for the value.
-h home_directory_basedir
Specifies the parent directory of the intended home directory for
the user. The final directory name is defined as this directory
name with the user's login name appended. If neither this value
nor the -H value is specified on the command line, the user will
be prompted for the value.
-H home_directory
Specifies the home directory path for the user. If neither this
value nor the -h value is specified on the command line, the user
will be prompted for the value.
-m mode
Specifies the mode for the user's home directory. If this argu-
ment is not specified, a default mode of 0755 will be used.
-p password
Specifies the password (in clear text) to be used for the ac-
count. If neither this argument nor the -P flag are used, the
user will be prompted for this information. Note that it is
somewhat of a security risk to use this option since the value
will be visible to other users via the ps command while the
adduser program is running.
-P encrypted_password
Specifies the already encrypted password to be used for the ac-
count. If neither this argument nor the -p flag are used, the
user will be prompted for this information.
-s shell
Specifies the login shell for the user. If this value is not
specified on the command line, the user will be prompted for the
information.
-S skeleton_directory
Specifies the skeleton directory to be used to create the new
users's home directory. By default, /usr/share/skel/skel.en_US
is used.
-u uid Use the specified UID for the user being created. By default,
user ID's are assigned starting at 100 and increase. If the -u
flag is used, the user-id is used for the new account even if it
is already assigned to another account. In that case, both ac-
counts will share the UID and the reverse mapping (from UID to
name e.g., by the ls -l command) will return one of the names in-
determinately.
The -D flag can be used to set the default values for the next invocation
of adduser. No users are added or deleted when the -D flag is provided.
For example, to set the default group for future invocations to staff and
the the uid to start searching for unused uids to 1000, use a command
like:
adduser-D -g staff -u 1000
If the password specified with the -p flag or at the Password: prompt
contains 8 characters or fewer, the standard password format is used. If
the password exceeds 8 characters, the "wide password" format is used (up
to 128 significant characters).
BUGS
The /etc/master.passwd and /etc/group files, and the databases created by
pwd_mkdb(8) are not updated until you are done adding users. If adduser
is interrupted for some reason, none of the users are added (although
their home directories have already been created). You should remove the
home directories before re-running adduser.
FILES
/etc/master.passwd, /etc/group, /var/db/passwd.cf
SEE ALSOaddgroup(8), passwd(5), group(5)HISTORY
The adduser and rmuser commands first appeared in BSD/OS and are current-
ly under development.
BSDI BSD/OS October 13, 1994 3