Operating System - HP-UX
1833108 Members
2935 Online
110051 Solutions
New Discussion

Replacement code for yppasswd

 
SOLVED
Go to solution
Travis Rebok
Advisor

Replacement code for yppasswd

I needed to be able to change almost all user's passwords on the server so I created a C program to run in batch which mimics the interactive passwd command (thanks to Clay's help).This program utilizes the getpwent() and putpwent() functions to go throught the /etc/passwd file on the local machine and do the password modiciations in a batch mode. This is fine if I run on a machine not using NIS.

However, I need to run on a machine using NIS as well, so I need to mimic yppasswd(3N) command for running in batch(the same way I was able to mimic passwd command with the use of getpwent() and putpwent() commands).

Does anyone know what functions I can use in a C program to mimic the yppasswd command? Or where I might be able to find a program as example?
Thanks.
2 REPLIES 2
Ceesjan van Hattum
Esteemed Contributor
Solution

Re: Replacement code for yppasswd

C-sources for manipulation of
passwd in NIS environments can be found at:
http://www.ja.net/CERT/Software/yapasswd/

Regards,
Ceesjan
Travis Rebok
Advisor

Re: Replacement code for yppasswd

Ceesjan -
Thanks for the link.