Content-type: text/html
adduser - Adds a new user interactively
If you have enhanced security installed on your system, you should use the dxaccounts command to add users. See the Security manual and the dxaccounts(8X) reference page for more information.
The adduser command is an interactive command for adding new user accounts to your system. The command prompts you for specific information and informs you of its activity and error conditions.
The adduser command invokes /usr/sbin/useradd to add the user account information to /etc/passwd and the hashed password database (if present).
Only the superuser can execute this command.
The command 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 command informs you of this and exits. If the entry does not already exist, the command 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 command uses this UID in the /etc/passwd file entry for the new user. While it is possible to have multiple entries with identical login names and/or identical user id's, it is usually a mistake to do so. Routines that manipulate these files will often return only one of the multiple entries, and that one by random selection. 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, 8 characters or less. If the group does not exist, the command 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.
At this point, the command ends.
Users are advised to migrate to the /usr/sbin/useradd utility or the dxaccounts utility as this command may be removed in a future version of the operating system.
The addgroup command limits a group name to eight characters or less. If you specify a new group name when prompted, your entry must meet this restriction.
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 ... Do you wish to edit the auth file entry for this user (y/[n])? You must enter a new password for (chris). Changing password for chris. New password: Retype new password:
Specifies the command path Group file Password file Default files directory
Commands: addgroup(8),
chfn(1),
chsh(1),
dxaccounts(8X),
groupadd(8),
mkpasswd(8),
passwd(1),
removeuser(8),
useradd(8),
userdel(8),
vipw(8)
Files: group(4), passwd(4) delim off