• Aucun résultat trouvé

Adding a User Account

Dans le document XENIX® System V (Page 187-192)

Preparing XENIX for Users

10.2 Adding a User Account

You can add a user account to the system with the mkuser program. The program creates a new entry in the XENIX system's letclpasswd file. This entry contains information about the new user (such as login name and initial password) that the system uses to let the user log in and begin work. The program also creates a home directory for the user, a mailbox for use with the mail command, and an initialization file (for example, .profile for the Bourne shell or .login for C-shell) containing XENIX com-mands that are executed when the user logs in.

To create a new user account, follow these steps:

1. Log in as the super user.

XENIX System Administrator's Guide

2. Enter:

mkuser

~ sysadmsh users select: Users~Add

and press the RETURN key. The system displays the following message:

Mkuser Add a user to the system

Do you require detailed instructions? (y/n/q)

3. Enter the letter y (for "yes"), if you want information about the program, otherwise type the letter n (for "no"). Enter q (for

"quit") only if you wish to stop the program and return to the sys-tem. If you type a "q" to any "(yIn)" prompt, the program will stop and no changes will be made.

4. When the program continues, you are prompted for user id:

Do you wish to use the next available user id? (y/n/q)

If you enter n, you are asked to specify the id number you wish to use.

5. Next, you are prompted for the login name:

10-2

Enter new user's login name, or enter q to quit:

The login name is the name by which XENIX identifies the user. It is usually a short version of the user's actual name, typed in lower-case letters. For example, either "johnd" (a first name and last initial) or "jdoe" (a first initial and last name) is customary for the user John Doe.

Preparing XENIX for Users

6. Enter the new name, and press the RETURN key. The program now prompts you for information about the new user's group name and group number.

A group name is the name of the group of users to which the new user will belong. Users in a group have access to a common set of files and directories. The group name is optional.

The program prompts:

Do you want to use the default group? (yin):

If you enter "y", the user's group name will be "group" and the group ill number will be 50.

If you enter "n", the program responds with a list of existing groups:

Existing groups are:

Group "group" (50): demo vdemo cdemo Do you want to use one of these groups? (yin):

If you enter either "y" or "n", you are asked which group you want to use. Enter the name of the group. You may create a new group by entering in the new name.

Next, you are prompted for a group number. The group ID, or number, may be any number from 50 to 30000 that isn't already used for another group.

7. After entering the group name and ID, you are prompted for the initial password.

Enter at least 5 characters for the password.

Enter password:

The initial password is the password you assign to the new user.

XENIX System Administrator's Guide

The user will use the initial password to enter the account for the first time. Once in the account, the user should create a new pass-word for himself, one that is hard to guess. (See the section

"Changing Your Password" in the "Logging In" chapter of the XENIX Tutorial.)

8. Enter the password, and press the RETURN key.

9. Next, you are prompted for a shell type. You see a list and brief explanation of the available shells (the menu selections depend on what packages and/or applications installed on your system) and the prompt:

ENTER Shell type (1, 2, 3, . . . ) and press RETURN:

sh is the standard (Bourne) shell. vsh is the menu driven "visual"

shell, csh is the C-shell, rsh is the restricted shell, and uucp login is an entry in /usrllib/uucp/uucico enabling logging in to the sys-tem via uucp. For more infonnation, see sh(C) and csh(C) in the XENIX User's Reference.

10. Enter the desired shell number and press RETURN. After you have entered the shell type, the program prompts you for a com-ment:

10-4

r

Please enter Comment

>--->

A comment is infonnation about the new user, such as a depart-ment name and phone extension. Although, the comdepart-ment is optional, it is useful if the finger(C) command is often used to display infonnation about users. If given, the comment must be no more than 20 characters long, including spaces. It must not con-tain any colons (:). The example

John Doe, 123

shows the recommended fonn for a comment.

Preparing XENIX for Users

11. Enter the comment. Make sure it is 20 characters or less. If you do not wish to enter a comment, just press RETURN.

The program now displays what you have entered and the special user entry that it has created for the new user. This entry is copied to the special system file /etclpasswd. The entry shows the login name, the encrypted password, the user rD, the group rD, the com-ment, the user's home directory, and the startup program. Fields in the entry are separated by colons (:). (For a full description of each field, see passwd(F) in the XENIX User's Reference.

The program then gives you an opportunity to change the user name, password, group, or comment:

Username is "johnd", user ID is 2001.

Group name is "group", group number is 50.

Comment field is: John Doe, 123 Shell is "/bin/csh"

Do you want to change anything? (yin):

12. Enter the letter y (for "yes") and press the RETURN key, if you wish to change something. Enter n (for "no") and skip to the next step if you wish to complete the new account. (Enter q, for

"quit", only if you wish to leave the program and abort the new account.)

If you enter y, the program prompts for the field you wish to change:

1. User name 2. User id (uid) 3. Group

4. Shell 5. Password

6. Comment in /etc/passwd

Select an item to change, or enter q to quit:

Enter the name of the item (field) you wish to change and press RETURN. After you have changed a field, you see the complete list of fields and are asked if you wish to make other changes.

When you are finished with any changes, the program adds the user.

XENIX System Administrator's Guide

13. The program displays the messages:

Password file updated.

Group file updated.

Home directory lx/name created.

Ix/name/.shellfile created.

Test mail sent to user user.

User name added to this system.

The program then asks if you wish to add another user to the sys-tem.

14. Enter y if you wish to add another user. Otherwise, enter n to stop the program and return to the super user prompt.

A user can log into a new account as soon as it is created. For details see the' 'Logging In" chapter of the XENIX Tutorial.

Dans le document XENIX® System V (Page 187-192)