[CentOS] Generating password string in /var/nis/passwd with Perl
alexander.farber at gmail.com
Tue Jan 20 16:11:27 UTC 2009
in our network we have AD (Win 2003) for user authentication
under Windows and NIS (CentOS 5.2) for same under Linux:
# rpm -qf /var/yp
I have written a CGI Script to add new users both to AD and
NIS and also to create the home dirs at our NetApp-Filer.
Unfortunately some steps still have to be made by hand
(the sysadmin copy-pastes it from a browser to a shell).
I could skip one manual step (calling yppasswd) if I knew
how to generate the passwd string for /var/nis/passwd:
Has anybody already figured out, how to do it from Perl?
I'm sure there must be some way (smth. with Perl's crypt).
PS: Here is my script: http://pastebin.com/m46057a70
feel free to modify and use
More information about the CentOS