| United States-English |
|
|
|
![]() |
HP Servers and Workstations: Managing Systems and Workgroups > Chapter 8 Administering a System: Managing
System SecurityManaging Standard 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. System Administrator’s ResponsibilitiesThe system administrator and every user on the system must share responsibility for password security. The system administrator performs the following security tasks:
User’s ResponsibilityEvery 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 standard system maintains one password file: /etc/passwd. If NIS+ is configured, this process is more complex; see “Network Information Service Plus (NIS+)”. All passwords are encrypted immediately after entry, and stored in the password file, /etc/passwd. Only the encrypted password is used in comparisons. Do not permit any empty/null password fields in the password file. 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 file directly. Use SAM, useradd, userdel, or usermod to modify password file entries. The /etc/passwd file is used to authenticate a user at login time for standard HP-UX. The file contains an entry for every account on the HP-UX system. Each entry consists of seven fields, separated by colons; see passwd(4). A typical /etc/passwd entry looks like this: robin:Z.yxGaSvxAXGg:102:99:Robin Hood,Rm 3,x9876,408-555-1234:/home/robin:/usr/bin/sh The fields contain the following information (listed in order), separated by colons:
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 should be unique. See chfn(1), chsh(1), passwd(1), and passwd(4). 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, evolved strictly for user convenience, providing commands that could be executed without logging in. To tighten security, they have been eliminated in the distributed /etc/passwd so that these programs can be run only by a user who is logged in. Other such entries remain in /etc/passwd because they are owners of files. Programs with owners such as adm, bin, daemon, hpdb, lp, and uucp 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. The customary pseudo- and special accounts are shown in Figure 8-1 “Pseudo- and Special System Accounts”. Figure 8-1 Pseudo- and Special System Accounts
The key to the privileged status of these subsystems is their ability to grant access to programs under their jurisdiction, without granting root access (uid 0). Instead, the setuid bit for the executable file is set and the effective user of the process corresponds to the owner of the executable file. For example, the cancel command is part of the lp subsystem and runs as effective user lp. Once set, the security mediation of that subsystem enforces the security of all programs encompassed by the subsystem, not the entire system. Hence, the subsystem’s vulnerability to a breach of security is also limited to only that subsystem files. 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:
As of HP-UX 11i, a new kernel parameter, executable_stack, allows you to prevent a program from executing code from its stack. This guards against an intruder passing illegal data to a program, causing the program to execute arbitrary code from its program stack. By default, for backward compatibility, executable_stack is set to 1, which allows stack execution. You can use SAM to change the value to 0, preventing stack execution. If a program does need to execute its stack, you can use the command chatr +es enable program to allow stack execution. See chatr(1) for details. |
||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||