Accounts for Users and Groups


In Chapter 5, I explained the information that is associated with each user and group . There is an entry in the /etc/passwd file for each user and an entry in /etc/group for each group. To save you the trouble of flipping back to Chapter 5 Figure 10-5 is an example of a user entry from /etc/passwd and an example of a group entry from /etc/group:

Figure 10-5. Sample /etc/passwd and /etc/group Entry

graphics/10fig05.gif

The Accounts for Users and Groups top-level SAM category, or area, has beneath it only two picks: Groups and Users . The menu hierarchy for "Users and Groups" is shown in Figure 10-6.

Figure 10-6. Accounts for Users and Groups

graphics/10fig06.gif

When you select Accounts for Users and Groups and then Users from the SAM menu, you are provided a list of all the users on your system. Figure 10-7 is a list of users provided by SAM for a system including Oracle users:

Figure 10-7. List of Users

graphics/10fig07.gif

Adding a User

SAM is ideal for performing administration tasks related to users and groups. These are routine tasks that are not complex but require you to edit the /etc/passwd and /etc/group files, make directories, and copy default files, all of which SAM performs for you. Finally, take a minute to check what SAM has done for you, especially if you modify an existing user or group.

To add an additional user, you would select Add from the Actions menu under Users and then fill in the information as shown in Figure 10-8:

Figure 10-8. Example of Adding a New User

graphics/10fig08.gif

There are some restrictions when entering this information. For instance, a comma and colon are not permitted in the Office Location field.

When I tried to enter a comma, SAM informed me that this was not permitted.

To see the /etc/passwd entry that was made I issued the following cat and grep commands that showed two users who had admin in their names :

 #  cat /etc/passwd  grep admin  webadmin:*:40:1::/usr/obam/server/nologindir:/usr/bin/false admin::102:20:Roger  Williams,NY NY,Internal  5613,Unavailable:/home/admin:/usr/bin/sh # 

This user admin has no password entry, as indicated by the :: , which is a poor practice. You want to make sure that there are passwords for all users.

You can view the log file that SAM produces with the menu selection Options - View SAM Log. Figure 10-9 show the end of the log file indicating that our user was successfully added:

Figure 10-9. SAM Log Viewer for Adding a User

graphics/10fig09.gif

The scroll bar on the right-hand side of the SAM Log Viewer allows you to scroll to any point in the log file. We are viewing only the part of the log file that pertains to adding the user Roger Williams . You can select the level of detail you wish to view with the log file. The four levels are Summary, Detail, Verbose, and Commands Only . The level shown in Figure 10-9 is Detail . I like this level because you can see what has taken place without getting mired down in too much detail. When you view the log file, you typically see the calls to SAM scripts that SAM has made as well as other commands that SAM is issuing.

Adding a Group

Adding an additional group is similar to adding a new user. To add an additional group, you would select Add from the Actions menu under Groups . Figure 10-10 shows the Add a New Group window:

Figure 10-10. Example of Adding a New Group

graphics/10fig10.gif

In Figure 10-10, I added a new group called apps with a group ID of 102 , and into that group I added the user admin that we had earlier created.



HP-UX 11i Systems Administration Handbook and Toolkit
HP-UX 11i Systems Administration Handbook and Toolkit (2nd Edition)
ISBN: 0131018833
EAN: 2147483647
Year: 2003
Pages: 301

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net