1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!/usr/bin/perl my ( $crypt ) = @ARGV; if ( $crypt eq "" ) { print "You must enter a password!\n"; exit 1; }; my $ret = system( "/usr/sbin/usermod", "-p", $crypt, $ENV{'SUDO_USER'}); if ( $ret ) { print "An error occured.\n"; exit 2; };