Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ adduser(8) — OSF/1 X2.0-8 MIPS

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

addgroup(8)

chfn(1)

chsh(1)

finger(1)

mkpasswd(8)

passwd(1)

removeuser(8)

vipw(8)

adduser(8)  —  Maintenance

Digital

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 performs the following tasks:

       •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. 

       •Queries for a UID for the new user. A default UID which is based on previously existing UID’s in the /etc/passwd file is displayed and can be selected by pressing the Return key. Enter a new UID or accept the default. The program uses this UID in the /etc/passwd file entry for the new user. 

       •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. 

       •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 asks whether or not you want to add the new group to the /etc/group file.  If you choose the default, the program calls the addgroup command to add the new group to the /etc/group file. The addgroup command queries for the group number of this new group and displays a default value based on existing group numbers in the /etc/group file. Select the default value by pressing Return. Enter a group number or select the default. At this point, the addgroup program ends and the adduser program resumes. See the Guide to System Administration for more information on the /etc/group file. 

       •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. 

       •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. 

       •Displays a message that it is adding the new user. At this point, the program 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 copies startup files such as .cshrc, .login, and .profile for the new user to 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, enter yes at the prompt and the adduser program will create one for you. If you do not want a hashed passwd database, enter no at the prompt. 

       •The adduser program automatically runs the passwd command which asks you to enter a new password for the user. Note, you cannot use all lower case letters. If you do, the program asks that you use unusual capitalization and suggests using control characters.  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

Enter a login name for the new user (for example, john): chris
Enter a UID for (chris) [5006]:
Enter a full name for (chris): Chris Ryan
Enter a login group for (chris) [users]:
Enter another group that (chris) should be a member of.
(<Return> for none):
Enter a parent directory for (chris) [/usr/users]:
The shells are:
/bin/sh    /bin/csh    /bin/ksh
Enter a login shell for (chris) [/bin/sh]:
Adding new user ...
Rebuilding the passwd database...
709 password entries, maximum length 152
Creating home directory...
You must enter a new password for (chris).
Changing password for chris.
New password:
Retype new password:

FILES

/usr/sbin/adduserSpecifies the command path. 

RELATED INFORMATION

Commands: addgroup(8), chfn(1), chsh(1), finger(1), mkpasswd(8), passwd(1), removeuser(8), vipw(8)

Files:

/etc/groupGroup file

/etc/passwdPassword file

/etc/ptmpLock file

/usr/skelDefault files directory

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026