adduser(8) — Maintenance
OSF
NAME
adduser − Adds a new user interactively
SYNOPSIS
/usr/sbin/adduser
DESCRIPTION
The adduser command is an interactive program for adding new user accounts to your system. The program prompts you for specific information and informs you of its activity and error conditions.
Only the superuser can execute this command.
The program follows this sequence:
•It queries for a login name for the new user. Enter the login name. If this entry already exists in the passwd file, the program informs you of this and exits. If the entry does not already exist, the program creates one for the new user.
•It queries for a full name of the new user. Enter the user’s full name. This is sometimes called the "gecos" entry and is displayed by the finger command.
•It queries for a login group for the new user and specifies the default group, users. To accept the default, press the Return key. To select a different group, enter the name of that group. If the group does not exist, the program displays a message saying that the group is unknown, lists the names of the groups that are available, and exits the program. Add the new group to the /etc/group file, then reinvoke the adduser program. See Guide to System Administration for more information on the /etc/group file.
•It queries for other groups of which the new user will be a member. Again, the group you specify must already exist. If you specify a group to which the user already belongs, the program informs you of this.
•It queries for a base directory for the new user and specifies the default directory, /usr/users. To accept the default, press the Return key. To select a different home directory, enter the path of that directory. The path that you specify must exist within a mounted file system.
•It displays a message that it is adding the new user. At this point, the program creates a UID, makes an entry for the user in the passwd file, creates the home directory, creates the mail directory, sets ownership and access permissions on the new user’s home and mail directories, and creates (or copies) the required startup files (.cshrc, .login, and .profile) for the new user in the home directory.
•If a hashed passwd database existed previously, the system displays a message stating the number of password entries and the maximum length. If a hashed passwd database did not exist previously, the program displays a message telling you that the hashed passwd database does not exist and asks if you want a database created. If you want a hashed passwd database, type yes at the prompt and the adduser program will create one for you. If you do not want a hashed passwd database, type no at the prompt.
•The adduser program displays a message similar to the following example saying that the passwd field is an asterisk (∗) and asks you to enter a new password for the user. Use the passwd command to do this. Note, you cannot use all lower case letters. If you do, the program asks that you use unusual capitalization and suggests using control characters.
# passwd kris
At this point, the program ends.
The adduser program automatically creates a /var/spool/mail directory for the user. This directory is owned by the user.
EXAMPLE
New login name: kris
User full name : Kris Ryan
User login group [ users ] ?
Working ...
Another group that ’kris’ should be a member of. <CR> for none:
Base directory for ’kris’ [/usr/users]:
Adding new user ...
15 password entries, maximum length 88
.....Copying .profile
.....Copying .cshrc
.....Copying .login
The passwd field is ’∗’. Enter the new passwd for ’kris’
# passwd kris
New password:
Retype new password:
FILES
/usr/sbin/adduserSpecifies the command path.
RELATED INFORMATION
Commands: chfn(1), chsh(1), finger(1), passwd(1), vipw(8)
Files: passwd(4)