Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ adduser(8) — Digital UNIX 3.2c

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chfn(1)

chsh(1)

finger(1)

passwd(1)

addgroup(8)

mkpasswd(8)

removeuser(8)

vipw(8)

adduser(8)  —  Maintenance

NAME

adduser − Adds a new user interactively

SYNOPSIS

/usr/sbin/adduser

DESCRIPTION

Security Note

If you have enhanced security installed on your system, you should use the XSysAdmin program to add users.  See the Security manual and the XSysAdmin(8) reference page for more information. 

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:

       •Prompts you to enter 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. 

       •Prompts you to enter 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. 

       •Prompts you for the 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. 

       •Prompts you to enter 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. 

There is a limitation on the number of users that can be added to a group.  The maximum line length is LINE_MAX as defined in the limits.h file.  It is recommended that the users be divided into a number of manageable groups. 

See the System Administration manual for more information on the /etc/group file. 

       •Prompts you for the name of other groups for the user to belong to.  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. 

       •Prompts you to enter the 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 /var/spool/mail directory if necessary, 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. 

       •Asks if you want to edit the authentication file entry for the user. If the environment variable EDITOR is set, adduser will use $EDITOR to edit the user’s authentication entries. 

       •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 creates 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 and verify a new password for the user.  Note that you cannot use all lowercase letters.  If you do, the program asks that you use unusual capitalization and suggests using control characters. 

If you mistype the password when you are asked to verify it, no password is set and the account is disabled.  To enable the user account, enter the passwd command followed by the user name. 

At this point, the program ends. 

EXAMPLES

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
Do you wish to edit the auth file entry for this user (y/[n])?
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. 

/etc/groupGroup file

/etc/passwdPassword file

/etc/ptmpLock file

/usr/skelDefault files directory

RELATED INFORMATION

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

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