* npasswd
@ 2002-06-25 23:03 Priscilla
2002-06-26 13:09 ` npasswd Bob Sloane
0 siblings, 1 reply; 4+ messages in thread
From: Priscilla @ 2002-06-25 23:03 UTC (permalink / raw)
Hi,
I am running OSF 5.1 with enhanced security (bigcrypt encryption)
for passwords, stored in NIS (prpasswd). I am looking for a tool
that allows me further control than what the OS allows me over
what passwords users can choose-- such as enforcing that passwords
have at least one capital letter, non-alpha, etc.
I installed npasswd from the University of Texas at Austin website,
but when I run it, it does not recognize the
old password. It tells me incorrect password (and I know it's right).
My questions are:
1. Has anyone successfully installed npasswd on a C2/NIS setup?
2. Are there other tools I've overlooked that can do this?
Thanks,
Priscilla
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: npasswd
2002-06-25 23:03 npasswd Priscilla
@ 2002-06-26 13:09 ` Bob Sloane
2002-06-26 17:13 ` npasswd Ann Majeske
2002-06-26 21:55 ` npasswd Priscilla
0 siblings, 2 replies; 4+ messages in thread
From: Bob Sloane @ 2002-06-26 13:09 UTC (permalink / raw)
In article <110fcff.0206251503.63ac5cc5@posting.google.com>,
pdioquino@yahoo.com (Priscilla) writes:
> 2. Are there other tools I've overlooked that can do this?
Take a look at "man prpasswd" in the section on u_policy. When this
is set, the file /tcb/bin/pwpolicy is run to check the password. I
have attached a simple example of how this works. You will probably
want to write something a little more robust for production work. :-)
This just checks to see that the password doesn't equal the username
and that it is mixed case.
--
USmail: Bob Sloane, University of Kansas Computer Center, Lawrence, KS, 66045
E-mail: sloane@ukans.edu http://www.ukans.edu/home/sloane Phone:(785)864-0444
#include <stdio.h>
#include <string.h>
#define UPPERCASE 1
#define LOWERCASE 2
#define NUMERIC 4
#define OTHER 8
main() {
char func[64];
char pass[64];
char user[64];
int ch;
int i;
/*
* first thing should be a function number. Currently, only "1" is defined
*/
if ( fgets(func,63,stdin) == 0 )
exit(0); /* be generous and allow protocol errors */
/*
* Second thing should be the username
*/
if ( fgets(user,63,stdin) == 0 )
exit(0); /* be generous and allow protocol errors */
/*
* delete the trailing newline that fgets appends
*/
if ( user[strlen(user)-1] == '\n' ) user[strlen(user)-1] = '\0';
/*
* next should be the password
*/
if ( fgets(pass,63,stdin) == 0 )
exit(0); /* be generous and allow protocol errors */
/*
* delete the trailing newline that fgets appends
*/
if ( pass[strlen(pass)-1] == '\n' ) pass[strlen(pass)-1] = '\0';
/*
* Don't allow password == username
*/
if ( strcmp(user,pass) == 0 )
exit(1);
/*
* Make sure it isn't all the same case or all numeric
*/
for ( i=ch=0; i < strlen(pass); ++i ) {
if ( pass[i] >= 'a' && pass[i] <= 'z' )
ch |= LOWERCASE;
else if ( pass[i] >= 'A' && pass[i] <= 'Z' )
ch |= UPPERCASE;
else if ( pass[i] >= '0' && pass[i] <= '9' )
ch |= NUMERIC;
else
ch |= OTHER;
}
/*
* if password is all upper case,
*all lower case or all numeric it fails.
*/
if ( ch == LOWERCASE || ch == UPPERCASE || ch == NUMERIC )
exit(1);
/*
* password is OK.
*/
exit(0);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: npasswd
2002-06-26 13:09 ` npasswd Bob Sloane
@ 2002-06-26 17:13 ` Ann Majeske
2002-06-26 21:55 ` npasswd Priscilla
1 sibling, 0 replies; 4+ messages in thread
From: Ann Majeske @ 2002-06-26 17:13 UTC (permalink / raw)
There's another example of a site pwpolicy program at:
http://www.ultranet.com/~spiderb/sec/site-pwpolicy.c.txt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: npasswd
2002-06-26 13:09 ` npasswd Bob Sloane
2002-06-26 17:13 ` npasswd Ann Majeske
@ 2002-06-26 21:55 ` Priscilla
1 sibling, 0 replies; 4+ messages in thread
From: Priscilla @ 2002-06-26 21:55 UTC (permalink / raw)
sloane@ukans.edu (Bob Sloane) wrote in message news:<EQJlsaimkIjn@kuhub.cc.ukans.edu>...
> In article <110fcff.0206251503.63ac5cc5@posting.google.com>,
> pdioquino@yahoo.com (Priscilla) writes:
> > 2. Are there other tools I've overlooked that can do this?
>
> Take a look at "man prpasswd" in the section on u_policy. When this
> is set, the file /tcb/bin/pwpolicy is run to check the password.
Thank you Bob, this is what I need. Your example will certainly
make it easier to figure out too.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-06-26 21:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-25 23:03 npasswd Priscilla
2002-06-26 13:09 ` npasswd Bob Sloane
2002-06-26 17:13 ` npasswd Ann Majeske
2002-06-26 21:55 ` npasswd Priscilla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox