add_user(8) CLIX add_user(8)
NAME
add_user - Adds a user account to a machine
SYNOPSIS
/usr/etc/install/add_user uname uid gid fullname homedir shell
DESCRIPTION
The add_user command creates a new user account. It is purposely limited
in its abilities, and should be considered as a working example of how to
add a user account to a machine. System administrators may wish to use
this script as the basis for their own tools to create new accounts.
The adduser(8) manual page provides a more detailed description of the
steps involved in adding a user to a machine, including those steps
automated by add_user. Also refer to adduser(8) for information about
user accounts involving the Network Information Service (NIS).
When run, add_user first checks that the following conditions are
satisfied:
⊕ The command is being run by root.
⊕ A valid number of arguments have been supplied.
⊕ The user ID (uid) and group ID (gid) are between 10 and 60000.
⊕ A shell exists and is executable.
⊕ The home directory (homedir) does not already exist.
⊕ The parent directory where the home directory will be exists.
⊕ The filesystem where the home directory will be created is a local file
system.
⊕ The username (uname) and user ID (uid) do not already exist in the
/etc/passwd file.
When all of the preceding checks are satisfied, add_user performs the
following steps to create a user account:
⊕ Creates an entry in the /etc/passwd file.
⊕ Creates the home directory.
⊕ Changes the ownership and group of the home directory to that of the
new user.
2/94 - Intergraph Corporation 1
add_user(8) CLIX add_user(8)
⊕ Copies the default user startup files (.profile and .env) to the user's
home directory, and changes ownership and group membership for these
files to match that of the user.
EXAMPLES
The following example adds user J. Kelley to the current system:
# /etc/add_user jkelley 1099 10 "J. Kelley" /usr/jkelley /bin/ksh
This adds user "J. Kelley" to the system and creates an entry in the
/etc/passwd file that appears as follows:
jkelley::1099:10:J. Keley:/usr/jkelley:/bin/ksh
This command also creates the directory /usr/jkelley and copies the
default user startup files into it.
FILES
/etc/profile
The default .profile file placed in the user's home directory.
/etc/passwd
The system password file.
.env Korn shell variable assignments file.
.exrc Initialization script used by vi, vedit, or ex.
NOTES
After successfully running add_user, either the system administrator
(running as root) or the user should immediately create a password for the
account, using the passwd command, to deter unauthorized use of the new
account.
The add_user command does not check to see if the group ID exists in the
/etc/group file on the machine. Thus, the user's group may not have a
name associated with it.
WARNINGS
Do not attempt to run add_user on a system that has the SECURE C2 Security
product installed on it.
DIAGNOSTICS
The numerous error messages that add_user may issue are intended to be
self-explanatory.
2 Intergraph Corporation - 2/94
add_user(8) CLIX add_user(8)
RELATED INFORMATION
Commands: csh(1), ksh, passwd(1), adduser(8)
2/94 - Intergraph Corporation 3