* Summary: Changing passwords via web
@ 1999-12-20 23:19 Leonardo Mosquera
0 siblings, 0 replies; only message in thread
From: Leonardo Mosquera @ 1999-12-20 23:19 UTC (permalink / raw)
To: tru64-unix-managers
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: multipart/mixed; boundary="--Boundary_(ID_b+qN9Dha9mnfPIGTQPyBIw)", Size: 4949 bytes --]
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 = <SOCK>) =~ /^200/) || &error_out;
print SOCK "user $n\r\n";
(($line = <SOCK>) =~ /^200/) || &error_out;
print SOCK "pass $op\r\n";
(($line = <SOCK>) =~ /^200/) || &error_out;
print SOCK "newpass $np\r\n";
(($line = <SOCK>) =~ /^200/) || &error_out;
close(SOCK);
select(STDOUT);
$| = 0;
print $query->header(-expires=>'-1d');
print $query->start_html(-title=>'Password Change Successful');
print "<H1>Success!</H1>\n";
print "It appears your password change was successful.\n";
print "Please allow about 45 minutes for it to take effect.<p>\n";
print "<strong>NEW USERS</strong> should view the <a href=\"
http://pubpages.unh.edu/notes/ethics.html\">CIS Ethics
Statement</a>.<p>\n";
print "Experienced users can go to the top level of the <a
href=\"http://pubpages.unh.edu\
">pubpages.unh.edu</a> Web server (or anywhere else they want).<p>\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 "<H1>Sorry...</H1>\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 <a
href=\"mailto:questions\@cisunix.unh.edu\
">questions\@cisunix.unh.edu</a>\n";
print "or call the CIS Help Desk at (603)862-4242;\n";
print "Please note the diagnostic message:\n";
print "<BR><BR><B>$subline</B><BR><BR>\n";
print "Please go <a
href=\"http://pubpages.unh.edu/password.html\">back</A> 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)--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-12-20 23:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-12-20 23:19 Summary: Changing passwords via web Leonardo Mosquera
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox