tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: "Sheila H. Franklin, X8705" <sfrankl%unode2 () relay ! nswc ! navy ! mil>
To: tru64-unix-managers
Subject: [S] Problem with expired passwords
Date: Wed, 10 Jul 1996 08:58:48 +0000	[thread overview]
Message-ID: <96076335021349.tru64-unix-managers.marc@archive.invalid> (raw)

Thanks to Richard Rogers and Randy Hayman for the solution.  The 
set_auth_parameters command needed to look like: 

        set_auth_parameters(argc,argv);

After recompiling, it now works like before!!

Thanks again!!

Sheila 

================================================================================

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-10  8:58 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