This chapter explains how to enable system administrators and operators to perform privileged system operations.
List members of system:administrators group | pts membership |
Add a user to system:administrators group | pts adduser |
Remove a user from system:administrators group | pts removeuser |
Display ADMIN flag in Authentication Database entry | kas examine |
Set or remove ADMIN flag on Authentication Database entry | kas setfields |
Display users in UserList file | bos listusers |
Add user to UserList file | bos adduser |
Remove user from UserList file | bos removeuser |
A fully privileged AFS system administrator for a cell is privileged as follows:
This section describes the three privileges and explains why more than one privilege is necessary.
Note: | Never grant any administrative privilege to the user anonymous, even when a server outage makes it impossible to mutually authenticate. If you grant such privilege, then any user who can access a machine in your cell can issue privileged commands. The alternative solution is to put the affected server machine into no-authentication mode and use the -noauth flag available on many commands to prevent mutual authentication attempts. For further discussion, see Managing Authentication and Authorization Requirements. |
The first type of AFS administrative privilege is membership in the Protection Database system:administrators group. Members of the group have the following privileges:
To learn how to administer the system:administrators group, and how to change the default set of implicit ACL permissions, see Administering the system:administrators Group.
The second kind of AFS administrative privilege is having the ADMIN flag on the Authentication Database entry. Such administrators can issue all kas commands, which enable them to administer the Authentication Database.
To learn how to grant this type of privilege, see Granting Privilege for kas Commands: the ADMIN Flag.
The third type of privilege is inclusion in the file /usr/afs/etc/UserList on the local disk of each AFS server machine. Users listed in the file have the following privileges:
To learn how to grant this type of privilege, see Granting Privilege for bos, vos, and backup Commands: the UserList File.
Often, a cell's administrators require full administrative privileges to perform their jobs effectively. However, separating the three types of privilege makes it possible to grant only the minimum set of privileges that a given administrator needs to complete his or her work.
The system:administrators group privilege is perhaps the most basic, and most frequently used during normal operation (when all the servers are running normally). When the Protection Database is unavailable due to machine or server outage, it is not possible to issue commands that require this type of privilege.
The ADMIN flag privilege is separate because of the extreme sensitivity of the information in the Authentication Database, especially the server encryption key in the afs entry. When the Authentication Database is unavailable due to machine or server outage, it is not possible to issue commands that require this type of privilege.
The ability to issue privileged bos and vos command is recorded in the /usr/afs/etc/UserList file on the local disk of each AFS server machine rather than in a database, so that in case of serious server or network problems administrators can still log onto server machines and use those commands while solving the problem.
Members of the system:administrators group in the Protection Database can issue all pts commands and the fs setvol and fs setquota commands to set volume quotas, and implicitly have the a (administer) and by default l (lookup) permissions on the access control list (ACL) of every directory in the cell's AFS filespace.
You can change the set of ACL permissions that the File Server on a given file server machine implicitly grants to the members of the system:administrators group for the data in volumes that it houses. When you issue the bos create command to create and start the fs process on the machine, include the -implicit argument to the fileserver initialization command. For syntax details, see the fileserver reference page in the AFS Command Reference Manual. You can grant additional permissions, or remove the l permission. However, the File Server always implicitly grants the a permission to members of the group, even if you set the value of the -implicit argument to none.
% pts membership system:administrators
where m is the shortest acceptable abbreviation of membership.
% pts membership system:administrators
% pts adduser -user <user name>+ -group system:administrators
where
% pts membership system:administrators
% pts removeuser -user <user name>+ -group system:administrators
where
Grant or deny an administrator the permission to issue all kas commands by setting or removing the ADMIN flag on his or her Authentication Database entry. The kas commands are used to administer the Authentication Database.
The Authentication Server performs its own authentication rather than accepting your existing AFS token. By default, it authenticates your local (UFS) identity, which possibly does not correspond to an AFS-privileged administrator. Include the -admin_username argument (here abbreviated to -admin) to name a user identity that has the ADMIN flag on its Authentication Database entry.
% kas examine <name of user> \ -admin <admin principal to use for authentication> Administrator's (admin_user) password: admin_password
where
If the ADMIN flag is turned on, it appears on the first line, as in this example:
% kas e terry -admin admin Administrator's (admin) password: admin_password User data for terry (ADMIN) key version is 0, etc...
The Authentication Server performs its own authentication rather than accepting your existing AFS token. By default, it authenticates your local (UFS) identity, which possibly does not correspond to an AFS-privileged administrator. Include the -admin_username argument (here abbreviated to -admin) to name a user identity that has the ADMIN flag on its Authentication Database entry. To verify that an entry has the flag, issue the kas examine command as described in To check if the ADMIN flag is set.
% kas setfields <name of user> ADMIN \ -admin <admin principal to use for authentication> Administrator's (admin_user) password: admin_password
where
The Authentication Server performs its own authentication rather than accepting your existing AFS token. By default, it authenticates your local (UFS) identity, which possibly does not correspond to an AFS-privileged administrator. Include the -admin_username argument (here abbreviated to -admin) to name a user identity that has the ADMIN flag on its Authentication Database entry. To verify that an entry has the flag, issue the kas examine command as described in To check if the ADMIN flag is set.
% kas setfields <name of user> NOADMIN \ -admin <admin principal to use for authentication> Administrator's (admin_user) password: admin_password
where
To enable an administrator to issue all privileged bos, vos, and backup commands, add the administrator's username to the /usr/afs/etc/UserList file. Although each AFS server machine maintains a separate copy of the file on its local disk, it is conventional to keep all copies the same. It can be confusing for an administrator to have the privilege on some machines but not others.
If your cell runs the United States edition of AFS and uses the Update Server to distribute the contents of the system control machine's /usr/afs/etc directory, then edit only the copy of the UserList file stored on the system control machine. If you have forgotten which machine is the system control machine, see The Four Roles for File Server Machines.
If your cell runs the international edition of AFS, or does not use a system control machine, then you must edit the UserList file on each server machine individually.
To avoid making formatting errors that can result in performance problems, never edit the UserList file directly. Instead, use the bos adduser or bos removeuser commands as described in this section.
% bos listusers <machine name>
where
% bos listusers <machine name>
% bos adduser <machine name> <user names>+
where
If you are running the international edition of AFS, or do not use the Update Server, repeat the command, substituting the name of each AFS server machine for machine name in turn.
% bos listusers <machine name>
% bos removeuser <machine name> <user names>+
where
If you are running the international edition of AFS, or do not use the Update Server, repeat the command, substituting the name of each AFS server machine for machine name in turn.