I am sorry, I forgot to mention this answer too, the software here is
VERY useful and interesting (sorry Michalis, and thanks):
5) Dare I suggest (my) WebRAT? It's an open source software that does a
lot more things than just change passwords for users. It's written in
CGI-perl and does not call any system-specific functions or scripts.
I've tested it with Digital Unix 4.0D and it works just fine, if you
don't have C2 enabled. (I haven't tested it with C2 but it shouldn't
work as far as I know).
You may find it in
http://hq.hellug.gr/~webrat and it is stable right
now.
If you have lots of servers to administer, (either DU or multi-OS) it's
a good choise.
Regards
Michalis Kabrianis
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\_at_cisunix.unh.edu\
">questions\_at_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
Received on Mon Dec 20 1999 - 23:24:37 NZDT