summaryrefslogtreecommitdiff
path: root/pinyadmin/sbin/newpasshash
blob: bf55a769afd92a4ba73f1c7472b000499a774be4 (plain)
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;
};