| United States-English |
|
|
|
![]() |
HP-UX System Administration Tasks: HP 9000 > Chapter 12 Managing System Security Managing Passwords and System Access |
|
The password is the most important individual user identification symbol. With it, the system authenticates a user to allow access to the system. Since they are vulnerable to compromise when used, stored, or known, passwords must be kept secret at all times. The security administrator and every user on the system must share responsibility for password security. The security administrator performs the following security tasks:
Every user must observe the following rules:
Observe the following guidelines when choosing a password:
Management must forbid sharing of passwords. It is a security violation for users to share passwords. A trusted system maintains two password files: the /etc/passwd file and the protected password database, /tcb/files/auth/user_initial/user_name. Every user has entries in both files, and login looks at both entries to authenticate login requests. All passwords are encrypted immediately after entry, and stored in the password file: /etc/passwd for standard HP-UX, and /tcb/files/auth/user_initial/user_name for trusted systems. Only the encrypted password is used in comparisons. Do not permit any empty password fields in either password file. On trusted systems, the password field in /etc/passwd is ignored. A user with an empty password will be forced to set a password upon login on a trusted system. However, even this leaves a potential for security breach, because any user can set the password for that account before a password is set for the first time. Do not edit the password files directly. Use SAM, useradd, or usermod to modify password file entries. HP-UX generates these mapping files to provide faster access to the password files.
It is possible for these mapping files to get out of sync with the password database files, resulting in users unable to login. In this case, remove the mapping files. The system will automatically regenerate new mapping files. The /etc/passwd file is used to authenticate a user at login time for standard HP-UX. The file contains descriptions of every account on the HP-UX system. Each entry consists of seven fields, separated by colons. A typical entry of /etc/passwd in a trusted system looks like this:
The fields contain the following information (listed in order):
The user can change the password by invoking passwd, the comment field (fifth field) with chfn, and the login program path name (seventh field) with chsh. The system administrator sets the remaining fields. The uid must be unique. See passwd(1) and passwd(4). When a system is converted to a trusted system, the encrypted password, normally held in the second field of /etc/passwd, is moved to the protected password database, and an asterisk holds its place in the /etc/passwd file. Protected password database files are stored in the /tcb/files/auth hierarchy. User authentication profiles are stored in these directories based on the first letter of the user account name. For example, authentication profile for user david is stored in file /tcb/files/auth/d/david. On trusted systems, key security elements are held in the protected password database, accessible only to superusers. Password data entries should be set via SAM. Password data which are not set for a user will default to the system defaults stored in the file /tcb/files/auth/system/default. The protected password database contains many authentication entries for the user. prpwd(4) provides more information on these entries. These entries include:
On trusted systems, the system administrator can control how passwords are generated. The following password generation options are available:
Password generation options may be set for a system. Also, the system administrator can set password generation options per user basis, which override the system default. At least one password generation option must be set for each user. If more than one option is available to a user, a password generation menu is displayed when the user changes his password. The system administrator may enable or disable password aging for each user. When password aging is enabled, the system maintains the following for the password:
The expiration time and lifetime values are reset when a password is changed. A lifetime of zero specifies no password aging; in this case, the other password aging times have no effect. On trusted systems, the system administrator may specify times-of-day and days-of-week that are allowed for login for each user. When a user attempts to log in outside the allowed access time, the event is logged (if auditing is enabled for login failures and successes) and the login is terminated. The superuser can log in outside the allowed access time, but the event is logged. The access time is stored in the protected password database for users and may be set via SAM. For each mux port and dedicated DTC port on a trusted system, the system administrator can specify a list of users allowed for access. When the list is null for a device, all users are allowed access. The device access information is stored in the device assignment database, /tcb/files/auth/devassign, which contains an entry for each device on the trusted system. A field in the entry lists the users allowed on the device. Terminal login information on a trusted system is stored in the terminal control database, /tcb/files/ttys, which provides the following data for each terminal:
Only superusers may access these trusted system databases and may set the entries via SAM. See devassign(4) and ttys(4) for more information. The following library routines can be used to access information in the password files and other trusted system databases. Refer to Section 3 of the HP-UX Reference for details. Title not available (Manipulating the Trusted System Databases )
By tradition, the /etc/passwd file contains numerous "pseudo-accounts" — entries not associated with individual users and which do not have true interactive login shells. Some of these entries, such as date, who, sync, and tty, have evolved strictly for user convenience. To tighten security, they have been eliminated in /etc/passwd so that these programs can be performed only by a user who is logged in. Other such entries remain in /etc/passwd because each are owners of files. Among them are bin, daemon, adm, uucp, lp, and hpdb. Programs with owners such as bin, uucp, adm, lp, and daemon encompass entire subsystems, and represent a special case. Since they grant access to files they protect or use, these programs must be allowed to function as pseudo-accounts, with entries listed in /etc/passwd.
Key to the privileged status of these subsystems is their ability to grant access to programs under their jurisdiction, without granting a user ID of 0. Instead, the setuid bit is set and the uid bit is set equal to the specified subsystem (for example, uid is set to lp). Once set, security mediation of that subsystem enforces the security of all programs encompassed by the subsystem, not the entire system. However, the subsystem's vulnerability to breach of security is also limited to the subsystem files only. Breaches cannot affect the programs under different subsystems (for example, programs under lp do not affect those under daemon). To protect against system penetration via modem, observe these precautions:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||