#!/usr/bin/perl my $userid = $ARGV[0]; my $passwd = $ARGV[1]; my $hashedpass = crypt($passwd, "\$6\$sa"); $hashedpass =~ s/\$/\\\$/g; print "useradd -m -p $hashedpass $userid\n";