United States-English |
|
|
HP-UX System Administrator's Guide: Security Management: HP-UX 11i Version 3 > Chapter 2 Administering User and System SecurityAuthenticating Users During Login |
|
To gain access to a system and its resources, users are required to log in. By controlling access to the system, you can try to prevent unauthorized users from accessing the system. However, even if unauthorized users do gain access, you can still prevent them from running programs that consume resources and from accessing system data. This section explains what happens during the login process from the time you type your user name to the time you get a shell prompt. The following steps describe the login process. This information shows how important it is to create unique user names and to maintain a password security policy. For more information, refer to login(1).
You can have the login process perform further user authentication using the Pluggable Authentication Modules (PAM). For more information, see pam.conf(4) and Section . The following files keep a log of logins:
Use the lastb command to read the /var/adm/btmp file to see if unauthorized users have attempted to log in. Use the last command to read the/var/adm/wtmp file. The last and lastb commands display the most recent user information, in descending order. The wtmp and btmp files tend to grow without bound, so check them regularly. Periodically remove information that is no longer useful to prevent the file from becoming too large. The wtmp and btmp files are not created by the programs that maintain them. If these files are removed, login record keeping is turned off. A common mistake users make during login is to enter the password, or part of the password at the login prompt. This failed login is recorded in the btmps file and exposes the password or partial password. For this reason, the file protection on the btmps should be set so that it is only readable by administrators.
If the security policy requires that past sessions of one user cannot be viewed by another user, then the file protection of the /var/adm/wtmp file may also need to be changed. See last(1), utmp(4), and wtmp(4) for more information. The utmp database is a user accounting database managed and synchronized according to /var/adm/utmp by the utmpd command. Application programs can access the utmps database. See utmpd(1M) and utmps(4). This section contains examples of using the last command. The following command lists all of the root sessions and all sessions on the console terminal:
The following command lists when reboots have occurred:
The who command examines the /etc/utmp file to obtain current user login information. In addition, the who command can list logins, logoffs, reboots, changes to the system clock, and processes spawned by the init process. Use the who -u command to monitor who is currently logged in. For example:
See who(1) for more information. |
Printable version | ||
|