3 keyfs, warning \- authentication database files
29 serves a two-level file tree for manipulating authentication information.
30 It runs on the machine providing authentication service for the local
31 Plan 9 network, which may be a dedicated authentication server or
33 The programs described in
37 as their interface to the authentication database.
40 reads and decrypts file
45 which is by default read from
52 prompts for a password from which the key is derived.
54 holds a 41-byte record for each user in the database.
55 Each record is encrypted separately
56 and contains the user's name,
67 The status is a byte containing
68 binary 0 if the account is enabled,
70 Host status is a byte containing
71 binary 1 if the user is a host,
73 The expiration date is four-byte little-endian integer
74 which represents the time in seconds since the epoch
77 at which the account will expire.
78 If any changes are made to the database that affect the information stored in
80 a new version of the file is written.
82 There are two authentication databases,
83 one for Plan 9 user information,
84 and one for SecureNet user information.
85 A user need not be installed in both databases
86 but must be installed in the Plan 9 database to connect to a Plan 9 server.
89 serves an interpretation of the
91 in the file tree rooted at
99 is represented as the directory
102 Making a new directory in
104 creates a new user entry in the database.
105 Removing a directory removes the user entry,
106 and renaming it changes the name in the entry.
107 Such changes are reflected immediately in
110 does not allow duplicate names when creating or renaming user entries.
112 All files in the user directories except for
116 strings with a trailing newline when read,
117 and should be written as
119 strings with or without a trailing newline.
123 encryption key for the user.
125 The following files appear in the user directories.
129 The authentication key for the user.
130 If the user's account is disabled or expired,
131 reading this file returns an error.
134 changes the key in the database.
137 The number of consecutive failed authentication attempts for the user.
140 increments this number; writing
143 This number is not stored in
145 and is initialized to 0 when
148 When the number reaches a multiple of ten,
150 temporarily disables the account for that many seconds.
155 files during this time return the error
156 ``user in purgatory.''
159 The current status of the account, either
171 The expiration time for the account.
172 When read, it contains either the string
174 or the time in seconds since the epoch
175 that the account will expire.
176 When written with strings of the same form,
177 it sets the expiration date for the user.
178 If the expiration date is reached,
179 the account is not disabled,
182 cannot be read without an error.
191 once every 24 hours to mail people about expiring keys.
192 Warnings are sent 14 days and 7 days prior to expiration.
201 to restrict the warnings to
202 the Plan 9 or SecureNet database.
209 own default is to warn about both.
214 are used to find the mail addresses to send to.
215 The first word on each line identifies
217 Any subsequent strings on the line delimited '<' and '>' are considered mail
218 addresses to send warnings to.
219 If multiple lines match a user, the last in the file is used.
223 adds lines to these files.
228 Encrypted key file for the Plan 9 database.
231 Encrypted key file for the SecureNet database.
234 List of users in the Plan 9 database.
237 List of users in the SecureNet database.
240 The non-volatile RAM on the server, which holds the key used
241 to decrypt key files.
243 .B /sys/src/cmd/auth/keyfs.c
245 .B /sys/src/cmd/auth/warning.c