From: "Sheila H. Franklin, X8705" <system_sf%unode2 () relay ! nswc ! navy ! mil>
To: tru64-unix-managers
Subject: [Q] Problem with expired passwords
Date: Tue, 09 Jul 1996 08:54:28 +0000 [thread overview]
Message-ID: <96076335021321.tru64-unix-managers.marc@archive.invalid> (raw)
Hi,
I just upgraded to DU 4.0 with C2 enabled. A program, which worked on DU 3.2C,
to force users to change their passwords when they login doesn't work any
longer. I pulled the program off this list, so I'm hoping someone here can help
fix it. I'm not a programmer!!
When I ran the program without recompiling, it disabled the account and reset
the time that the password was changed to Dec 31, 1969. After recompiling with
the -lsecurity option, I now get "Security command was invoked without ANY
arguments."
Here is the program:
#include <string.h>
#include <sys/types.h>
#include <sys/security.h>
#include <prot.h>
main(int argc, char *argv[])
{
struct pr_passwd *name;
char *username[9];
if(argc<2){printf("Username not provided..exiting...\n");exit(1);}
set_auth_parameters();
strcpy(username,argv[1]);
if ((name = getprpwnam(username)) == NULL){
printf("Username not found...exiting...\n");exit(1);}
initprivs(username);
name->ufld.fd_schange=0;
putprpwnam(username,name);
endprpwent();
exit(0);
}
Thanks,
Sheila
*******************************************************************************
** Sheila H. Franklin **
** Naval Surface Warfare Center Dahlgren Division **
** 17320 Dahlgren Road **
** Code N861 **
** Dahlgren, VA 22448-5000 **
** Phone: (540) 653-8705 **
** FAX: (540) 653-1810 **
** Internet: sfrankl@nswc.navy.mil **
*******************************************************************************
reply other threads:[~1996-07-09 8:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox