adduser(1M) adduser(1M)NAME adduser - add a user account SYNOPSIS adduser [-r real-name] [-a address] [-x extension] [-p home-phone] [-g group] [-s shell] [-d dir] [-h home] [-u lowest] [-U uid] [-i] [-c] [login-name]... DESCRIPTION adduser creates an account for each login-name. One or more accounts may be added with a single command; command-line options apply to all names given. For each user, a password file entry is generated, and a home directory is created. If no login-names are provided, adduser enters interactive mode, prompting for all values that were not specified on the command line. adduser uses the information given, or appropriate defaults, to generate an entry suitable for inclusion in /etc/passwd. If appropriate, an entry is also generated for /etc/group. For each account created, a brief report is written to the standard output. In the interactive mode, a confirmation is requested before the final changes to /etc/passwd are made. A new home directory is created, if necessary, and startup files (.cshrc, .kshrc, .login, .logout, and .profile) are copied in to it from /skel. Directory and file permissions are set to read, write, and execute for owner, and read and execute for group (750). The information used to create each ac- count is stored in a README file in each new home directory. adduser does not permit new users to be added locally to a system that is receiving its password file via the Yellow Pages (YP). Accounts for users already in the YP password database can be added locally, but login name, group ID, and password fields are those given by the YP database, rather than those specified in the adduser command line. In interactive mode, adduser prompts for a password for each new account. In batch mode, the password field is set to ,.., which causes a password to be set when the account is first used. FLAG OPTIONS Command line options allow administrators to override de- fault values. The following flag options are available: -r real-name Specify the real name of a person, for exam- ple, "Fred Smith" to be associated with the account. To preserve embedded spaces, such as the space between the first and last name, April, 1990 1
adduser(1M) adduser(1M)place quotation marks around real-name. Quotes should be used to protect any blanks in the name. -a address Specify an office address, for example, mail stop or building number. -x extension Specify an office telephone number. For exam- ple, 3120. If you wish to surround the exten- sion with parentheses, the entire string must be quoted, and a space must follow the closing parenthesis, as in "(3120) ". -p home-phone Specify a home telephone number. For example, 408-555-1212. If you wish to surround a por- tion of the telephone number with parentheses, the entire phone number must be quoted and the closing parenthesis must be followed by a space, as in "(408) 555-1212". -g group Specify the initial login group in which each user is to be placed. If omitted, adduser creates a unique group for each user. The group name created is of the form gpgid where gid is the next available numeric group ID. -s shell Specify the full pathname of an executable program to use as the shell for each user ad- ded. If omitted, the default is /bin/csh. Other common choices are /bin/ksh, and /bin/sh. -d dir Specify the full pathname of the parent of the user's home directory. By default, home directories are created as /users/login-name. This option causes a directory other than /users to be used. The name of the home directory is that of the new account, login- name. This option may not be used with the -h option. -h home Specify the full pathname of the desired home directory. The login-name is not to be con- sidered, and home is used as the name of the home directory. This option may not be used with the -d option. -u lowest Specify the desired lower bound for determin- ing a numeric user ID (UID). If omitted, adduser uses the first available UID > 200. The lowest UID may only be specified from the command line; interactive mode does not prompt 2 April, 1990
adduser(1M) adduser(1M)for this value. This option may not be used with -U. -U uid Force the numeric UID to be uid. The UID may only be forced from the command line; interac- tive mode does not prompt for this value. This option may not be used with -u. -i Force an interactive mode, which is normally entered only if login-name is omitted. This option forces adduser to prompt for a real name, address, extension, home phone, group, shell, or home directory, which was not sup- plied on the command line. -c Create a USEFUL COMMAND folder in the home directory of the user. FILES /etc/gtmp Temporary group file /etc/ptmp Temporary password file /etc/ogroup Old group file /etc/opasswd Old password file /usr/lib/skel/* Standard startup files (.cshrc, .login, .profile, ...) $HOME/README Account-information file placed in each new account SEE ALSO csh(1), ksh(1), sh(1), vipw(1M). A/UX Network System Administration. BUGS Telephone number checking is too restrictive. You should be able to use parentheses in the extension and phone number without having to follow the right parentheses with a space. April, 1990 3