File: auarf203.htm

package info (click to toggle)
openafs 1.4.2-6etch3
  • links: PTS
  • area: main
  • in suites: etch
  • size: 42,324 kB
  • ctags: 55,614
  • sloc: ansic: 397,846; sh: 10,033; makefile: 9,203; perl: 7,679; java: 5,633; asm: 1,276; yacc: 983; lex: 318; tcl: 249; objc: 137; csh: 123
file content (88 lines) | stat: -rw-r--r-- 4,728 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 4//EN">
<HTML><HEAD>
<TITLE>Administration Reference</TITLE>
<!-- Begin Header Records  ========================================== -->
<!-- /tmp/idwt3672/auarf000.scr converted by idb2h R4.2 (359) ID      -->
<!-- Workbench Version (AIX) on 3 Oct 2000 at 16:18:30                -->
<META HTTP-EQUIV="updated" CONTENT="Tue, 03 Oct 2000 16:18:29">
<META HTTP-EQUIV="review" CONTENT="Wed, 03 Oct 2001 16:18:29">
<META HTTP-EQUIV="expires" CONTENT="Thu, 03 Oct 2002 16:18:29">
</HEAD><BODY>
<!-- (C) IBM Corporation 2000. All Rights Reserved    --> 
<BODY bgcolor="ffffff"> 
<!-- End Header Records  ============================================ -->
<A NAME="Top_Of_Page"></A>
<H1>Administration Reference</H1>
<HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf202.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Bot_Of_Page"><IMG SRC="../bot.gif" BORDER="0" ALT="[Bottom of Topic]"></A> <A HREF="auarf204.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
<P>
<H2><A NAME="HDRKPWVALID" HREF="auarf002.htm#ToC_217">kpwvalid</A></H2>
<A NAME="IDX5194"></A>
<A NAME="IDX5195"></A>
<A NAME="IDX5196"></A>
<P><STRONG>Purpose</STRONG>
<P>Checks quality of new password
<P><STRONG>Description</STRONG>
<P>The <B>kpwvalid</B> command checks the quality of a new password passed
to it from the <B>kpasswd</B> or <B>kas setpassword</B>
command. It is optional. If it exists, it must reside in the
same AFS directory as the binaries for the <B>kpasswd</B> and
<B>kas</B> command suites (create a symbolic link from the client
machine's local disk to this directory). The directory's ACL
must extend the <B>a</B> (<B>administer</B>) and <B>w</B>
(<B>write</B>) permissions to the <B>system:administrators</B>
group only. These requirements prevent unauthorized users from
substituting a spurious <B>kpwvalid</B> binary.
<P>The AFS distribution includes an example <B>kpwvalid</B> program that
checks that the password is at least eight characters long; the code for
it appears in the following <B>Examples</B> section.
<P>The script or program must accept a sequence of password strings, one per
line, on the standard input stream. The first is the current password
and is ignored. Each subsequent string is a candidate password to be
checked. The program must write the following to the standard output
stream for each one:
<UL>
<P><LI><TT>0</TT> (zero) and a newline character to indicate that the password
is acceptable
<P><LI>A non-zero decimal number and a newline character to indicate that the
password is not acceptable
</UL>
<P>Further, it must write any error messages only to the standard error
stream, not to the standard output stream.
<P><STRONG>Examples</STRONG>
<P>The following example program, included in the AFS distribution, verifies
that the requested password includes eight or more characters.
<PRE>   #include &lt;stdio.h>
   /* prints 0 if the password is long enough, otherwise non-zero */
   main()
   {
   char oldpassword[512];
   char password[512];
   
   if (fgets(oldpassword, 512, stdin))
      while (fgets(password, 512, stdin)) {
         if (strlen(password) > 8) { /* password includes a newline */
            fputs("0\n",stdout);
            fflush(stdout);
         }
         else {
            fputs("Passwords must contain at least 8 characters.\n",
                  stderr);
            fputs("1\n",stdout);
            fflush(stdout);
         }
   return 0;
   }
   
</PRE>
<P><STRONG>Related Information</STRONG>
<P><A HREF="auarf194.htm#HDRKAS_SETPASSWORD">kas setpassword</A>
<P><A HREF="auarf202.htm#HDRKPASSWD">kpasswd</A>
<P>
<HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf202.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Top_Of_Page"><IMG SRC="../top.gif" BORDER="0" ALT="[Top of Topic]"></A> <A HREF="auarf204.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
<!-- Begin Footer Records  ========================================== -->
<P><HR><B> 
<br>&#169; <A HREF="http://www.ibm.com/">IBM Corporation 2000.</A>  All Rights Reserved 
</B> 
<!-- End Footer Records  ============================================ -->
<A NAME="Bot_Of_Page"></A>
</BODY></HTML>