Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing passwords using PAM functions

Status
Not open for further replies.

Venus

Programmer
Mar 22, 2001
21
0
0
CA
Hi everyone,
I am creating a login program that uses the PAM functions. When you login, it checks with another machine to see if the password is correct. If the password is correct it compares the password with the machine logging in. I need to update these passwords if they are different. Right now I am using fgetpwent to find the record & keep a pointer to the position in the file (which means I know the file name for the passwords). Then I use putwent to update the password in this record. Is this the correct way to manipulate the password files or is there a better way? I eventually need this to work on systems running NIS? Will these functions differ (I won't know which file the password is in to update it)?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top