| United States-English |
|
|
|
![]() |
HP-UX System Administration Tasks: HP 9000 > Chapter 1 Setting Up a System Controlling Access to Your System |
|
You can control who has access to your system, its files, and its processes. Authorized users gain access to the system by supplying a valid user name (login name) and password. Each user is defined by an entry in the file /etc/passwd. Use SAM to add, remove, deactivate, reactivate, or modify a user account. For additional information about passwords, refer to passwd(4) and passwd(1). To manually change user account entries, use the /usr/sbin/vipw command to edit /etc/passwd; see vipw(1M) for details. Working groups, file permissions, and file ownership all determine who can access a given file. Users on your system can be divided into working groups so
that files owned by members of a given group can be shared and yet
remain protected from access by users who are not members of the
group. A user's primary group membership number is included as one
entry in the /etc/passwd
file. Group information is defined in /etc/group
Users who are members of more than one group, as specified in /etc/group, can change their current group with the /usr/bin/newgrp command. You do not need to use the newgrp command if user groups are defined in /etc/logingroup. If you do not divide the users of your system into separate working groups, it is customary to set up one group (usually called users) and assign all users of your system to that group. Use SAM to add, remove, or modify group membership. To manually change group membership, edit /etc/group and optionally /etc/logingroup with a text editor, such as vi. Although you can enter a group-level password in /etc/group, it is not recommended. To avoid maintaining multiple files, you can link /etc/logingroup to /etc/group. For details on the /etc/group and /etc/logingroup files, refer to group(4). There are special privileges that you can assign to a group of users using the /usr/sbin/setprivgrp command. For information, refer to setprivgrp(1), setprivgrp(2), getprivgrp(1), rtprio(1), rtprio(2), plock(2), shmctl(2), chown(1), chown(2), lockf(2), setuid(2), and setgid(2). The /usr/bin/chmod command changes the type of access (read, write, and execute privileges) for the file's owner, group, member, or all others. Only the owner of a file (or the superuser) can change its read, write, and execute privileges. For details, see chmod(1). By default, new files have read/write permission for everyone (-rw-rw-rw-) and new directories have read/write/execute permission for everyone (drwxrwxrwx). Default file permissions can be changed using the /usr/bin/umask command. For details, see umask(1). Access control lists (ACLs) offer a finer degree of file protection than traditional file access permissions. With the /usr/bin/chacl command, you can use ACLs to allow or restrict file access to individual users unrelated to what group the users belong. Only the owner of a file (or the superuser) can create ACLs with the chacl command. For additional ACL information, see lsacl(1), chacl(1), and acl(5), and Chapter 12, "Managing System Security" in this manual. The /usr/bin/chown command changes file ownership. To change the owner, you must own the file or have superuser privileges. The /usr/bin/chgrp command changes file group ownership. To change the group, you must own the file or have superuser privileges. For more information, refer to chown(1) and chgrp(1). A run-level is an HP-UX state of operation in which a specific set of processes is permitted to run. These processes and default run-levels are defined in the file /etc/inittab. The run-levels are:
The default run-level is usually run-level 3 or 4, depending on your system. You can create new run-levels or change which processes can run at these predefined run-levels by adding a new entry or changing an existing entry in /etc/inittab. This file defines how you want the system to operate when in a specific run-level. Any user with write permission for /etc/inittab can create new run-levels or redefine existing run-levels. See inittab(4) for details. You can use SAM to shut down a system and change the current run-level to single-user state. Use the "Routine Tasks" and "System Shutdown" menus. The superuser logged in at the system console can also change the current run-level with the /sbin/init command, as follows:
For increased security, ensure that the permissions (and ownership) for the files /sbin/init and /etc/inittab are as follows:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||