* POP password changer
@ 1996-08-15 13:47 Michael Matthews
0 siblings, 0 replies; only message in thread
From: Michael Matthews @ 1996-08-15 13:47 UTC (permalink / raw)
To: tru64-unix-managers
I just went and got the Eudora poppassd program that was recently mentioned
on this list, because that's something I've been looking for, too.
I've made some changes to it, for it to handle locked accounts and to record
failed login attempts (context diff included below). What I'd like to know,
is how to make it check the previous password dictionary? Do I have to go
through each entry in the pwdict structure and compare crypts?
Here's the context diff:
# diff -c osf-poppassd.c osf-poppassd.c.orig
*** osf-poppassd.c Thu Aug 15 09:38:04 1996
--- osf-poppassd.c.orig Thu Aug 15 09:23:04 1996
***************
*** 6,14 ****
*
* Modified by Tarjei T. Jensen
*
- * Modified further by Michael Matthews (to handle locked accounts and
- * recording of failed login attempts)
- *
* Tested with Digital Unix 3.2C and Qualcomm's Eudora
*
* Some of the original Solaris comments:
--- 6,11 ----
***************
*** 148,170 ****
exit(1);
}
- if (pr_pwd->ufld.fd_lock) {
- WriteToClient("500 This account is locked. Please call the administrators.\n");
- exit(1);
- };
-
if (!chkPass (pr_pwd, oldpass))
{
WriteToClient ("500 Old password is incorrect.");
- pr_pwd->ufld.fd_nlogins++;
- pr_pwd->ufld.fd_ulogin = time(NULL);
- pr_pwd->uflg.fg_nlogins = 1;
- pr_pwd->uflg.fg_unsuctty = 1;
- pr_pwd->uflg.fg_ulogin = 1;
- strcpy(pr_pwd->ufld.fd_unsuctty,"poppassd");
- if (!putprpwnam(user,pr_pwd)) {
- syslog(LOG_ERR,"error saving incorrect pwchange info:
%s",errno);
- };
exit(1);
}
--- 145,153 ----
---
Mike Matthews, Mike_Matthews@sgate.com (NeXTmail accepted)
PGP public key available on request
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1996-08-15 13:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-08-15 13:47 POP password changer Michael Matthews
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox