#!/usr/bin/perl -w # # @(#) WebPass.cgi 1.02 (beta) 99/12/15 # (Modified from WebPass.cgi 1.01 (beta) 97/10/2...) # # @(#) WebPass.cgi 1.01 (beta) 97/10/2 # (Modified from HrMaintenance.cgi 3.0 (alpha) 97/07/22...) # # Copyright (C) 1997 William C. Jones, FCCJ Webmaster; All Rights Reserved... # # The information in this file is provided for the exclusive use of the # I/S Staff of Florida Community College at Jacksonville. Such users have # the right to use, modify, and incorporate this code into other products # for purposes authorized by the license agreement provided they include this # notice and the associated copyright notice with any such product. The # information in this file is provided "AS IS" without warranty. # Public Domain Notice - # Copyright Addendum: This code is not in the Public Domain. You are # granted a free license to use, modify, and/or incorporate this software # into your own projects, provided that the above copyright remains # intact and is included in any further software distributions. # If you redistribute this software - please send an e-mail to # webmaster@fccj.cc.fl.us outlining who you are, what version you # have, where you obtained your version, and where/how you are # distributing this version. Also, if you have modified the version # you plan on redistributing, include the changes as well... # Thx, # Bill :) # Purpose: Allow account holders to modify their own password... # # Provides an easy to use interface so that Students, Faculty, & # Staff would not be required to learn how to Telnet, etc... # # Usage: Executed whenever a User wishes to change their E-Mail 'passwd'. # # Input: UserID, Current Password, New Password... # # Calls: WebPass.expect (included) with validated data, as obtained above... # # Output: Processed HTML/JavaScript (Netscape ready; would need IE 3.02a or # better to utilize correctly; runs OK under Lynx or PROFS 'Charlotte.') # The output reports whether it was successful, or what type of error # was detected (Bad Password, Wrong Acct, etc...) # #============================================================================= # (Unless otherwise noted, all code changes made by WCJ, FCCJ Webmaster...) # Project started Oct 1997 using Modified HrMaintenance.cgi... # Note: Perl was created by Larry Wall. Larry will not provide support # for this software... Perl, however, can be obtained at your Local CPAN, or # on the Solaris Platform - at sunsite.unc.edu via http or ftp... # # This package (WebPass.cgi, WebPass.expect, et al.) was designed, developed, # written, tested, and used every day on a Solaris 2.5.x Ultra 1 Server and a # SUN Enterprise 3000 UltraSparc Server... # #============================================================================= use CGI qw(:all); # CGI.pm (written by Lincoln Stein.) use strict; # In conjunction with the -w option, make sure there no errors! my $usrID = param('usrID'); my $passwd = param('passwd'); my $passNew = param('passNew'); my $passAgain = param('passAgain'); my $acct = ''; # This area holds account info... my $pswd = ''; my $uid = ''; # There are several reasons why this area is blank. my $gid = ''; # A primary one is future expandibility. The variables my $quota = ''; # outlined here cover what is called the GECOS in the my $cmt = ''; # Unix OpSys. They represent about all relevant User & my $gcos = ''; # Group data available in most Unix systems... my $home = ''; my $shell = ''; # Most are not used here... # my $root = 'root'; my $prog ='/cgi-bin/WebPass.perl'; my $command ='/httpd/cgi-bin/WebPass.expect'; my $host = 'http://www.adi.net.tw'; my $company = '誠安電腦'; my $company_e = 'ADI Corp'; # Prepare to check security issues... Setup Globally Required variables... my($ercType) = ''; # The Error Type which occurred... my($ercCode) = ''; # The Error Code which occurred... my($buffer) = ''; # General buffer used to hold things... my $erc = ''; # My general flags, etc... my $z = ''; my $flag = 0; #............................................................................ sub errorReturned { # Was there an error? &fccjHeader(); print <<_erc_EOF_;
$ercType
$buffer
$ercCode