# IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # bos720 src/bos/usr/sbin/snappd/scripts/SRPassword.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 # # @(#)85 1.3 src/bos/usr/sbin/snappd/scripts/SRPassword.pl, snapp, bos720 5/31/02 07:51:18 #!/usr/bin/perl -T #--------------------------------------------------------- #-------- Name SRPassword.pl #--------------------------------------------------------- #-------- This script checks to see if the root user has a #-------- password. Then, it sends the appropriate page to #-------- the palm device to ask for old and new passwords #--------------------------------------------------------- #-------- Links to Pages: #-------- Home.pl #-------- SetPassword.pl #-------- ResetPassword.pl #--------------------------------------------------------- $ENV{'PATH'} = '/bin:/usr/bin'; $return = system('/usr/sbin/snapp/check_for_passwd'); # Return value must be shifted in order for it to be seen # correctly. $return = $return >> 8; if ("$return" == 0) { # Root has a password. So, user must reset the password open(OUTFILE,">/var/snapp/snapp.fres.tmp"); print OUTFILE < Verify Old Password 100 15 34 15 30 70 35 40 75 35 80 20 15 130 10 60 70 EOXML close(OUTFILE); } else { if ("$return" == 1) { # Root does not have a password. So, user is setting # the password. open(OUTFILE,">/var/snapp/snapp.fres.tmp"); print OUTFILE < Set New Password 100 15 34 45 70 40 35 35 75 20 80 15 130 10 60 70 EOXML close(OUTFILE); } else { # Unable to read the password information for root. # We should not proceed from here. open(OUTFILE,">/var/snapp/snapp.fres.tmp"); print OUTFILE < Error Getting Password Info 150 15 10 15 30 20 15 130 60 30 EOXML close(OUTFILE); } } system("/bin/cp /var/snapp/snapp.fres.tmp /var/snapp/snapp.fres");