3 kpwvalid - Checks quality of new password
7 The kpwvalid command checks the quality of a new password passed
8 to it from the B<kpasswd> or B<kas setpassword>
9 command. It is optional. If it exists, it must reside in the
10 same AFS directory as the binaries for the B<kpasswd> and
11 B<kas> command suites (create a symbolic link from the client
12 machine's local disk to this directory). The directory's ACL
13 must extend the B<a> (B<administer>) and B<w>
14 (B<write>) permissions to the B<system:administrators>
15 group only. These requirements prevent unauthorized users from
16 substituting a spurious B<kpwvalid> binary.
18 The AFS distribution includes an example kpwvalid program that
19 checks that the password is at least eight characters long; the code for
20 it appears in the following B<Examples> section.
22 The script or program must accept a sequence of password strings, one per
23 line, on the standard input stream. The first is the current password
24 and is ignored. Each subsequent string is a candidate password to be
25 checked. The program must write the following to the standard output
32 C<0> (zero) and a newline character to indicate that the password
38 A non-zero decimal number and a newline character to indicate that the
39 password is not acceptable
44 Further, it must write any error messages only to the standard error
45 stream, not to the standard output stream.
49 The following example program, included in the AFS distribution, verifies
50 that the requested password includes eight or more characters.
53 /* prints 0 if the password is long enough, otherwise non-zero */
56 char oldpassword[512];
59 if (fgets(oldpassword, 512, stdin))
60 while (fgets(password, 512, stdin)) {
61 if (strlen(password) > 8) { /* password includes a newline */
66 fputs("Passwords must contain at least 8 characters.\n",
77 L<kas_setpassword(1)>,
82 IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
84 This documentation is covered by the IBM Public License Version 1.0. It was
85 converted from HTML to POD by software written by Chas Williams and Russ
86 Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.