• Aucun résultat trouvé

An Illustrative Example of Using SAM

You can practice using SAM by working through this tutorial.

Prerequisites and Conditions

• Log in as the root user .

• Start up SAM by executing sam. You will see the main screen, which is a menu.

Adding a User to the System (Example)

Work through the tasks in the following sections (possibly 3-8 minutes).

Select the Appropriate Menu Item

1. In the Main Menu, the item is the one to select. It is already highlighted, so press (Return ), or the soft key for (the

@

key).

The menu screen for Users appears:

Add a New User Account to the System .. . Remove a User Account from the System .. . View/Modify a User's Account Information ...

Deactivate a User Account .. . Reactivate a User Account .. .

2. While you are in this menu screen, take a look at the help~~E~~ns for these menu items by highlighting a menu item and pressing theH'~'II' soft key.

Each menu item has its own help screen.

3. ·..lrl,nlTl,n- a user, use the arrow keys or the (Tab) key to

and press (Return ), or

Introduction to System Administration 1-21

Complete the Data Entry Screen

1. You complete nine fields. You must enter data in each field unless it is marked (optional). Each field has a help screen.

2. In the first field ("Login name"), type ut est.

3. Use (Tab) (or arrow keys) to move the cursor to the next field ("Primary group name"). Whenever possible, SAM provides a default value for fields, as it has done here. Here, the default is "users", and for convenience, the tutorial uses it. For now, move the cursor to the next field ("Home Directory" ).

4. When you entered the "Login name" in the first field, SAM added that to the /users directory. Consequently, the default home directory for this new user is /users/utest. We'll use this default, so move the cursor to the next field ("Start-up program").

The steps continue on the next page.

1-22 Introduction to System Administration

5. You have pre-defined choices for the start-up program (or shell). Press the soft key to see the list. The default start-up program is the Bourne shell (/bin/sh) Instead of using it, give the user the Korn shell by highlighting /bin/ksh and pressing (Return) or the soft key.

6. You should now be in the field labeled "Login with Xll windows? (y or n)".

Use the default value for this field.

7. From this point on in the screen, the fields are optional, which means you you can leave them blank.

Introduction to System Administration 1-23

Take a Moment to Compare Values

Before you continue, compare your screen values with the table values.

In the Field ... You Should Have ...

Login name utest

Group name users

Home directory /users/utest

Start-up program /bin/ksh

Login with XII windows? (y or n) n

Real name blank

Office location blank

Office phone blank

Home phone blank

1-24 Introduction to System Administration

Perform the Task

...

1. Press thelllll:lll:lilllilll softkey. A pop-up screen appears asking you to enter a password for the new user.

2. Enter the password test 1 and press (Return) or the the password does not appear as you type it.

soft key. Notice that

3. After you enter the password, SAM asks y9.~!.?' reenter the password. Once again, type test1 and press (Return) or the:IlIII;; soft key.

4. A progress message appears, letting you know that SAM is adding the user.

When SAM has completed the task, another message appears telling you that utest has been added to the system. Press the space bar to make this final message disappear.

5. You are now back in the data-entry screen. You can add another user, but do not do so now. Instead, press the key to return to the menu screen for Users.

Verify the Results

2. A pop-up screen asks you to enter the lo~~~~~me of the user to view or modify. Type ut est and press (Return) or

1111.

Incidentally, pressing the

key displays a list of the current users from which you can select the one you want to view or modify.

3. The account information of the user you just added to the system (utest) appears in the data-entry screen. SAM has successfully added the user.

Your Turn ...

Using SAM, remove the user you just added. If you need help, the procedure for doing this is on the next page.

Introduction to System Administration 1-25

How to Remove the User You Added

1. From the Main Menu of SAM, use (Tab )?~uU~"~~U~~E~~keys to highlight the menu item Users, then press (Return) or

:II:II":IIIII:it:emI.

2.

3. A pop-up window appears, asking for the login name of the user to remove.

Enter the login name (ut e st) and press (Return) or

4. SAM asks if you want to remove all files and directories belonging to this user from the system. The default is y (yes). You do want to remove all of this user's files and directories, so do not change the default. This is the only entry you can make in this screen.

5. Press the "softkey. A confirmation message appears to ensure this is really what you want to do. It is, so press y (yes) to continue with the process.

6. A progress message appears, letting you know that SAM is removing the user. When SAM has completed the task, another message appears telling you that utest has been removed from the system. Press the space bar to make this message disappear.

7. Pressing

key (now labeled 8. To exit SAM, press the

confirmation message,

exits this data-entry screen. Then, press the same to move to the Main Menu.

soft key, respond with a y to the you are out of SAM and back in your shell.

1-26 Introduction to System Administration