3 keyfs, warning \- authentication database files
32 serves a two-level file tree for manipulating authentication information.
33 It runs on the machine providing authentication service for the local
34 Plan 9 network, which may be a dedicated authentication server or
36 The programs described in
40 as their interface to the authentication database.
43 reads and decrypts file
47 using the DES or AES key,
48 which is by default read from
55 prompts for a password from which the key is derived.
57 holds a 41-byte (57-byte for AES) record for each user in the database.
58 Each record contains the user's name,
71 The status is a byte containing
72 binary 0 if the account is enabled,
74 Warning status is a byte containing
75 the number of user expiration notifications.
76 The expiration date is four-byte little-endian integer
77 which represents the time in seconds since the epoch
80 at which the account will expire.
81 The secret password is a null-terminated
86 If any changes are made to the database that affect the information stored in
88 a new version of the file is written.
92 option is given, the database is mounted `read-only' and no changes are permitted.
94 There are two authentication databases,
95 one for Plan 9 user information,
96 and one for SecureNet user information.
97 A user need not be installed in both databases
98 but must be installed in the Plan 9 database to connect to a Plan 9 server.
101 serves an interpretation of the
103 in the file tree rooted at
111 is represented as the directory
114 Making a new directory in
116 creates a new user entry in the database.
117 Removing a directory removes the user entry,
118 and renaming it changes the name in the entry.
119 Such changes are reflected immediately in
122 does not allow duplicate names when creating or renaming user entries.
124 All files in the user directories except for
130 strings with a trailing newline when read,
131 and should be written as
133 strings with or without a trailing newline.
137 encryption key for the user.
143 The following files appear in the user directories.
147 The authentication key for the user.
148 If the user's account is disabled or expired,
149 reading this file returns an error.
152 changes the key in the database.
155 The AES encryption key for the user.
161 The number of consecutive failed authentication attempts for the user.
164 increments this number; writing
167 This number is not stored in
169 and is initialized to 0 when
172 When the number reaches a multiple of ten,
174 temporarily disables the account for that many seconds.
179 files during this time return the error
180 ``user in purgatory.''
183 The current status of the account, either
195 The expiration time for the account.
196 When read, it contains either the string
198 or the time in seconds since the epoch
199 that the account will expire.
200 When written with strings of the same form,
201 it sets the expiration date for the user.
202 If the expiration date is reached,
203 the account is not disabled,
206 cannot be read without an error.
215 once every 24 hours to mail people about expiring keys.
216 Warnings are sent 14 days and 7 days prior to expiration.
225 to restrict the warnings to
226 the Plan 9 or SecureNet database.
233 own default is to warn about both.
238 are used to find the mail addresses to send to.
239 The first word on each line identifies
241 Any subsequent strings on the line delimited '<' and '>' are considered mail
242 addresses to send warnings to.
243 If multiple lines match a user, the last in the file is used.
247 adds lines to these files.
252 Encrypted key file for the Plan 9 database.
255 Encrypted key file for the SecureNet database.
258 List of users in the Plan 9 database.
261 List of users in the SecureNet database.
264 The non-volatile RAM on the server, which holds the key used
265 to decrypt key files.
267 .B /sys/src/cmd/auth/keyfs.c
269 .B /sys/src/cmd/auth/warning.c