Accounts for Users and Groups

   

HP-UX Virtual Partitions
By Marty Poniatowski

Table of Contents
Chapter 11.  System Administration Manager (SAM)


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 11-14 is an example of a user entry from /etc/passwd and an example of a group entry from /etc/group:

graphics/11icon01.gif

Figure 11-14. Sample /etc/passwd and /etc/group Entry

graphics/11fig14.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 11-15.

Figure 11-15. Accounts for Users and Groups

graphics/11fig15.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 11-16 is a list of users provided by SAM for a system including Oracle users:

Figure 11-16. List of Users

graphics/11fig16.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 11-17:

Figure 11-17. Example of Adding a New User

graphics/11fig17.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, which 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 11-18 shows the end of the log file, indicating that our user was successfully added:

Figure 11-18. SAM Log Viewer for Adding a User

graphics/11fig18.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 11-18 is Detail. I like this level because you can see what has taken place with-out 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 11-19 shows the Add a New Group window:

Figure 11-19. Example of Adding a New Group

graphics/11fig19.gif

In Figure 11-19, 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.


       
    Top
     



    HP-UX Virtual Partitions
    HP-UX Virtual Partitions
    ISBN: 0130352128
    EAN: 2147483647
    Year: 2002
    Pages: 181

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