USERADMIN(8)

NAME
useradmin, groupadmin - update user, group files

SYNOPSIS
useradmin [ -g ]
groupadmin [ -u ]

DESCRIPTION
Useradmin and groupadmin are different names for the same interactive program for updating the user and group files. The different names select which of two possible screens of lists of users and lists of groups are displayed. Alternatively the arguments -u or -g may be used to select the initial screen.

CONTROLS
For both the user and group screens the following commands may be used to navigate the information displayed:

Control-F may be used to page downwards through the file and Control-B to page upwards.

The characters k or - may be used to move the cursor up through the file and j or <return> to move down. These cursor movements are currently on a per window basis, and you therefore cannot use the j key to scroll down the whole file ( unless the whole file fits into a single window).

Control-L redraws the screen.

q quits out of the program, writing out changes to the password and group files.

Where possible the program will insert a default value for a field if Space or Return is typed at a prompt.

Backspace or Delete may be used to edit the values of the fields.

Control-C may be used to abandon the program without writing out the changes to the password and group file, but note that any user directories created will not be deleted.

? or h are used to print useful information on the bottom line of the screen. The two versions of the help line contain information on how to move around the screen, and how to alter the contents of the file being viewed. The help lines are toggled, so you can view the help line not currently being displayed by pressing either the ? or h key again.

USER LIST
If the user list is selected, the screen is filled with a formatted version of the password file /etc/passwd . The group numbers are expanded, if possible, into group names. The following commands may be used to access the list.

g Selects the group file.

u Adds a new user. Each field is separately prompted for, and on completion the directory is created, with the selected user and group. It is considered to be an error if the directory exists, owned by someone else.

When prompted for the userid, the operator may press space to have the program suggest the first unused userid greater than or equal to 100. If this is acceptable, pressing a return will use this userid, alternatively the next lowest unused userid will be prompted with instead.

If the operator elects to type in his or her choice of userid and this clashes with an existing userid, or is less than 100, then the choice will be queried before proceeding.

In a similar fashion, when prompted for the group id, the operator may press space to have the program suggest the name of a group whose id is greater than or equal to 100, and successive spaces to move through the group list, wrapping around to the beginning. Alternatively the operator may type the first letter or letters of the group name and press space and have the program suggest only group names beginning with that name.

Instead of using spaces when prompted for the group as explained above, the operator may either type the group name or a numeric group id, but the program insists that the group exists.

When prompted for the shell, the operator may reply with a single letter b, or c to denote the Bourne, or C shells respectively. Alternatively, the full pathname of a shell or user program can be typed at the prompt. There is no default shell available.

The command d Deletes a user (with confirmation) and (optionally) their associated home directory tree.

n Changes the name field of the user in the file, i.e. the field pw_gecos .

s Changes the shell field of the user, to the prompt for a new shell name; the user may select the Bourne or C shells using the single letters b, or c respectively. Alternatively, the user may select a different shell or user program by typing the full pathname of the program at the prompt.

GROUP LIST
The contents of the file /etc/group is accessed in a similar fashion to the user list in the file /etc/passwd described above.

u Selects the password file.

g Adds a new group. The name and the group id are separately prompted for.

When prompted for the group id, the operator may press space to have the program suggest the first unused group id greater than or equal to 100. If this is acceptable, pressing a return will use this group id, alternatively pressing space again will cause the next lowest unused group id to be presented.

If the operator elects to type in his or her choice of group id and this clashes with an existing group id, or is less than 100, then the choice will be queried before proceeding.

The command d Deletes a group (with confirmation).

m Changes the list of members in the group. Unknown users, or users whose default group is that group are considered to be errors.

p Sets a group password. (This is not approved of in some circles).

FILES
/etc/passwd
/etc/group
/etc/ptmp

BUGS
It should not be necessary to page to the next/previous sreen before j/k will move into them - if j/k would take one outside the bounds of the current screen an automatic scroll should happen.

If the program is abandoned with Control-C user directories created should be deleted.