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!

updating 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(password file) & fgetspent (shadow password file) 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 putpwent (password file) & putspent (shadow password file) 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)?
 
Sun Solaris: what are the number of maximum passwords available on a standard installation?
 
The maximum number of passwords available would be the number of users who have accounts on the system. I think this is the answer you are looking for but I'm not sure I completely understand the question and how it relates to the question I posted.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top