From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079091516469.tru64-unix-managers.marc@archive.invalid> From: Leonardo Mosquera Date: Mon, 20 Dec 1999 23:19:19 +0000 To: tru64-unix-managers Subject: Summary: Changing passwords via web X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079091516469 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary_(ID_b+qN9Dha9mnfPIGTQPyBIw)" This is a multi-part message in MIME format. --Boundary_(ID_b+qN9Dha9mnfPIGTQPyBIw) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Hi everybody, thanks for your help, my question was: > Hi everybody I need to write a web interface for a program that can > change the password of a user, the program is based in the one from > Eudora that changes passwords in the 106 port, I found an old program in > perl that uses LWP, but it is not working fine, I read that one function > that it uses LWP:Socket is too old, and I suspect that this is the place > where fails, so if someone knows of a CGI like this one or something > else that could help me I will be very grateful. There are a lot of software to do this, but the solution I was looking was this one from Paul A. Sand: 1) Here's what we use: Disclaimer: everything goes over the network in the clear, that's not too good an idea, but there you are. #!/usr/bin/perl # # CGI Client to interact with poppassd server # use CGI; use Socket; $query = new CGI; $n = $query->param("username"); $op = $query->param("oldpasswd"); $np = $query->param("passwd"); $np1 = $query->param("passwd1"); if ($np ne $np1) { $line="500 The entries for your new password weren't the same."; &error_out; } # # call the poppassd daemon on wilmot for now # $remote = "wilmot.unh.edu"; $port = 106; $iaddr = inet_aton($remote) or die "no host: $remote"; $paddr = sockaddr_in($port, $iaddr); $proto = getprotobyname('tcp'); socket(SOCK, PF_INET, SOCK_STREAM, $proto) or die "socket: $!\n"; connect(SOCK, $paddr) or die "connect: $!\n"; select(SOCK); $|=1; select(STDIN); $|=1; select(STDOUT); $|=1; (($line = ) =~ /^200/) || &error_out; print SOCK "user $n\r\n"; (($line = ) =~ /^200/) || &error_out; print SOCK "pass $op\r\n"; (($line = ) =~ /^200/) || &error_out; print SOCK "newpass $np\r\n"; (($line = ) =~ /^200/) || &error_out; close(SOCK); select(STDOUT); $| = 0; print $query->header(-expires=>'-1d'); print $query->start_html(-title=>'Password Change Successful'); print "

Success!

\n"; print "It appears your password change was successful.\n"; print "Please allow about 45 minutes for it to take effect.

\n"; print "NEW USERS should view the CIS Ethics Statement.

\n"; print "Experienced users can go to the top level of the pubpages.unh.edu Web server (or anywhere else they want).

\n"; print $query->end_html; exit(1); sub error_out { $subline = substr($line, 4); print $query->header; print $query->start_html(-title=>'Password Change Failed'); print "

Sorry...

\n"; print "We were unable to change your password. Please read the\n"; print "diagnostic message below and try again. If you need additional\n"; print "assistance, you can send e-mail to questions\@cisunix.unh.edu\n"; print "or call the CIS Help Desk at (603)862-4242;\n"; print "Please note the diagnostic message:\n"; print "

$subline

\n"; print "Please go back to try again. \n"; print $query->end_html; exit(1); } Anyway, this information is interesting too: 2) www.webmin.com program that lets you do all of your administration and password changes with your netscape browser uses a lot perl programs. Web admin is great. Install fast. http://host.domain:10000/ users 10000 as the port you can access your system on web and enter userid and password, do DNS, etc. Larry A. Magnello 3) look in : http://brink.linuxguru.net Maybe it can help you... PD: you can also search for similar things in www.freshmeat.net, it's a linux site, but most software can run in other plataforms such as Alpha... - Nestor Ruiz 4) Try taking a look on freshmeat. Some of their stuff is Linux specific, but a lot of it will work under Tru64. I did a quick search and came back with a couple of packages. http://freshmeat.net Having said that, I'd like to insert the standard disclaimer about web based password changing systems being a security problem in general. Tom Webster Thanks again. -- Leonardo Mosquera Bernal System Manager Internet Telecom Colombia --Boundary_(ID_b+qN9Dha9mnfPIGTQPyBIw) Content-type: text/x-vcard; name=lmosquer.vcf; charset=us-ascii Content-description: Card for Leonardo Mosquera Content-disposition: attachment; filename=lmosquer.vcf Content-transfer-encoding: 8BIT begin:vcard n:Mosquera;Leonardo tel;fax:571-2265561 tel;work:571-6176369 x-mozilla-html:FALSE org:Internet Telecom adr:;;;Santaf� de Bogot�;;;Colombia version:2.1 email;internet:lmosquer@col1.telecom.com.co title:System Manager x-mozilla-cpt:;31808 fn:Leonardo Mosquera end:vcard --Boundary_(ID_b+qN9Dha9mnfPIGTQPyBIw)--