Re: Generating password string in /var/nis/passwd with Perl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Tue, Jan 20, 2009 at 05:11:27PM +0100, Alexander Farber wrote:

> I could skip one manual step (calling yppasswd) if I knew
> how to generate the passwd string for /var/nis/passwd:
> 
> farber:oav3dV4.Mnj/.:10154153:5725:Alexander


> Has anybody already figured out, how to do it from Perl?

crypt is the function to call.

eg
  print crypt("hello","ab")
  abl0JrMf6tlhw

The "ab" is the salt and should be chose from [a-zA-Z0-9./]

"man 3 crypt" for the C version, which the perl version mimics


-- 

rgds
Stephen
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux