From 8a4e3cedb5ec2975228faad597909037d3225950 Mon Sep 17 00:00:00 2001 From: Joe Rayhawk Date: Fri, 27 Jan 2012 18:11:52 -0800 Subject: Initial shot at web-friendly (sadly PAM unfriendly...) password modification. --- pinyadmin/sbin/newpasshash | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pinyadmin/sbin/newpasshash (limited to 'pinyadmin/sbin') diff --git a/pinyadmin/sbin/newpasshash b/pinyadmin/sbin/newpasshash new file mode 100644 index 0000000..bf55a76 --- /dev/null +++ b/pinyadmin/sbin/newpasshash @@ -0,0 +1,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; +}; -- cgit v1.2.3