# IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # bos720 src/bos/usr/sbin/snappd/scripts/VerifyPassword.pl 1.3 # # Licensed Materials - Property of IBM # # COPYRIGHT International Business Machines Corp. 2000,2002 # All Rights Reserved # # US Government Users Restricted Rights - Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # IBM_PROLOG_END_TAG # # @(#)11 1.3 src/bos/usr/sbin/snappd/scripts/VerifyPassword.pl, snapp, bos720 5/31/02 07:51:26 #!/usr/bin/perl -T #--------------------------------------------------------- #-------- Name VerifyPassword.pl #--------------------------------------------------------- #-------- This script verifies the root password and #-------- asks for the new root password. #--------------------------------------------------------- #-------- Links to Pages: #-------- Home.pl #-------- SetPassword.pl #--------------------------------------------------------- $ENV{'PATH'} = '/bin:/usr/bin'; %hshObjectTags=@ARGV; $oldPassword = $hshObjectTags{"OldPassword"}; open(OUTFILE,">/var/snapp/snapp.fres.tmp"); `/usr/sbin/snapp/verify_passwd $oldPassword`; $return = $?; $return = $return >> 8; if ("$return" == 0) { # Password was correct. Prompt for the new password. print OUTFILE < Set New Password 100 15 34 15 30 70 40 35 35 75 20 80 15 45 10 60 70 EOXML } else { # Password was not correct. Go back to home page. print OUTFILE < Invalid Password: 150 15 30 40 15 15 15 130 65 25 EOXML } close(OUTFILE); system("/bin/cp /var/snapp/snapp.fres.tmp /var/snapp/snapp.fres");