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