Linux version of cryptpw

Hello,
  We are migrating to SuSE linux from Solaris. I have  program that generate a password using the 'cryptpw' . I cannot find this functon in Suse Linux. What would be equivalent function?

 SALT=`/usr/bin/date +%S%M`
CRYPTPASS=`/usr/local/bin/cryptpw $PASSWORD $SALT`


Thanks
SiemensSENAsked:
Who is Participating?
 
Beverley PortlockCommented:
In  a BASH script I used the following to generate passwords

pass=$(perl -e 'print crypt($ARGV[0], "password")' $password)

which I then updated into the user profile with useradd / usermod
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.