Sets optional characteristics in an Authentication Database entry
Synopsis
kas setfields -name <name of user> [-flags <hex flag value or flag name expression>] [-expiration <date of account expiration>] [-lifetime <maximum ticket lifetime>] [-pwexpires <number days password is valid ([0..254])>] [-reuse <permit password reuse (yes/no)>] [-attempts <maximum successive failed login tries ([0..254])>] [-locktime <failure penalty [hh:mm or minutes]>] [-admin_username <admin principal to use for authentication>] [-password_for_admin <admin password>] [-cell <cell name>] [-servers <explicit list of authentication servers>+] [-noauth] [-help] kas setf -na <name of user> [-f <hex flag value or flag name expression>] [-e <date of account expiration>] [-li <maximum ticket lifetime>] [-pw <number days password is valid ([0..254])>] [-r <permit password reuse (yes/no)>] [-at <maximum successive failed login tries ([0..254])>] [-lo <failure penalty [hh:mm or minutes]>] [-ad <admin principal to use for authentication>] [-pa <admin password>] [-c <cell name>] [-s <explicit list of authentication servers>+] [-no] [-h] kas sf -na <name of user> [-f <hex flag value or flag name expression>] [-e <date of account expiration>] [-li <maximum ticket lifetime>] [-pw <number days password is valid ([0..254])>] [-r <permit password reuse (yes/no)>] [-at <maximum successive failed login tries ([0..254])>] [-lo <failure penalty [hh:mm or minutes]>] [-ad <admin principal to use for authentication>] [-pa <admin password>] [-c <cell name>] [-s <explicit list of authentication servers>+] [-no] [-h]
Description
The kas setfields command changes the Authentication Database entry for the user named by the -name argument in the manner specified by the various optional arguments, which can occur singly or in combination:
The kas examine command displays the settings made with this command.
Cautions
The password lifetime set with the -pwexpires argument begins at the time the user's password was last changed, and is retroactive. If, for example, a user changed her password 30 days ago and the password lifetime is set to 30 days or less, her password effectively expires immediately. However, the Authentication Server grants approximately one day of grace in which she can change the password (after that time, an administrator must set if for her). To avoid retroactive expiration, instruct the user to change the password just before setting a password lifetime.
Administrators whose authentication accounts have the ADMIN flag enjoy complete access to the sensitive information in the Authentication Database. To prevent access by unauthorized users, use the -attempts argument to impose a fairly strict limit on the number of times that a user obtaining administrative tokens can provide an incorrect password. Note, however, that there must be more than one account in the cell with the ADMIN flag. The kas unlock command requires the ADMIN privilege, so it is important that the locked-out administrator (or a colleague) can access another ADMIN-privileged account to unlock the current account.
In certain circumstances, the mechanism used to enforce the number of failed authentication attempts can cause a lockout even though the number of failed attempts is less than the limit set by the -attempts argument. Client-side authentication programs such as klog and an AFS-modified login utility normally choose an Authentication Server at random for each authentication attempt, and in case of a failure are likely to choose a different Authentication Server for the next attempt. The Authentication Servers running on the various database server machines do not communicate with each other about how many times a user has failed to provide the correct password to them. Instead, each Authentication Server maintains its own separate copy of the auxiliary database file kaserverauxdb (located in the /usr/afs/local directory by default), which records the number of consecutive authentication failures for each user account and the time of the most recent failure. This implementation means that on average each Authentication Server knows about only a fraction of the total number of failed attempts. The only way to avoid allowing more than the number of attempts set by the -attempts argument is to have each Authentication Server allow only some fraction of the total. More specifically, if the limit on failed attempts is f, and the number of Authentication Servers is S, then each Authentication Server can only permit a number of attempts equal to f divided by S (the Authentication Server sync site tracks any remainder fmodS).
Normally, this implementation does not reduce the number of allowed attempts to less than the configured limit (f). If one Authentication Server refuses an attempt, the client contacts another instance of the server, continuing until either it successfully authenticates or has contacted all of the servers. However, if one or more of the Authentication Server processes is unavailable, the limit is effectively reduced by the quantity U divided by S, where U is the number of unavailable servers and S is the number normally available.
To avoid the undesirable consequences of setting a limit on failed authentication attempts, note the following recommendations:
Options
Acceptable values for the year range from 1970 (1 January 1970 is time 0 in the standard UNIX date representation) through 2037 (2037 is the maximum because the UNIX representation cannot accommodate dates later than a value in February 2038).
Specify an integer that represents a number of seconds (3600 equals one hour), or include a colon in the number to indicate a number of hours and minutes (10:00 equals 10 hours). If this argument is omitted, the default setting is 100:00 hours (360000 seconds).
When the password becomes invalid (expires), the user is unable to authenticate, but has 30 more days in which to issue the kpasswd or kas setpassword command to change the password (after that, only an administrator can change it). Note that the clock starts at the time the password was last changed, not when the kas setfields command is issued. To avoid retroactive expiration, have the user change the password just before issuing a command that includes this argument.
Specify a number of hours and minutes (hh:mm) or minutes only (mm), from the range 01 (one minute) through 36:00 (36 hours). The kas command interpreter automatically reduces any larger value to 36:00 and also rounds up any non-zero value to the next higher multiple of 8.5 minutes. A value of 0 (zero) sets an infinite lockout time; an administrator must issue the kas unlock command to unlock the account.
Examples
In the following example, an administrator using the admin account grants administrative privilege to the user smith, and sets the Authentication Database entry to expire at midnight on 31 December 2000.
% kas setfields -name smith -flags ADMIN -expiration 12/31/2000 Password for admin:
In the following example, an administrator using the admin account sets the user pat's password to expire in 60 days from when it last changed, and prohibits reuse of passwords.
% kas setfields -name pat -pwexpires 60 -reuse no Password for admin:
Privilege Required
The issuer must have the ADMIN flag set in his or her Authentication Database entry.
Related Information