openafs/doc/html/AdminReference/auarf203.htm
Derrick Brashear d7da1acc31 initial-html-documentation-20010606
pull in all documentation from IBM
2001-06-06 19:09:07 +00:00

89 lines
4.6 KiB
HTML

<!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>