tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* [Q] Problem with expired passwords
@ 1996-07-09  8:54 Sheila H. Franklin, X8705
  0 siblings, 0 replies; only message in thread
From: Sheila H. Franklin, X8705 @ 1996-07-09  8:54 UTC (permalink / raw)
  To: tru64-unix-managers

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-07-09  8:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-07-09  8:54 [Q] Problem with expired passwords Sheila H. Franklin, X8705

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox