[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Validating passwords via php, Lil help please! (Was with PERL)



Actually, take back that last email, newpass does seem to be working, just
don't know what it's doing, as the computer is just sitting there after I
put in newpass, I opened a new connection to the machine, and noticed that a
instance of passwd is running, along with poppassd. Interesting. So it must
be trying to change the password, right? Anyone know how to help out?

Thanks,
Jake

----- Original Message -----
From: <cyrus-mailinglist webnetix cc>
To: <redhat-list redhat com>
Sent: Friday, February 01, 2002 9:04 AM
Subject: RE: Validating passwords via php, Lil help please! (Was with PERL)


> There is no newpass command in the rfc standarts, is the newpass command
> working?
>
>
> -----Original Message-----
> From: redhat-list-admin redhat com [mailto:redhat-list-admin redhat com]
> On Behalf Of Jake McHenry
> Sent: Freitag, 01. Februar 2002 14:17
> To: redhat-list redhat com
> Subject: Validating passwords via php, Lil help please! (Was with PERL)
>
> K, this script uses php to access poppassd to change users passwords via
> a
> form that I threw together quick, but there is a problem. The results of
> the
> php is that it successfully changes the password, but it actually does
> not
> change it. Can anyone point me in the right direction as to why this
> script
> is not functioning for me?
>
> -----------------------------------------------------
>
> <?
> $cfgServer = "enigma.ministang.com";
> $cfgPort = 106;
> $cfgTimeOut = 10;
> echo "<br>";
> # open a socket first
> if(!$cfgTimeOut)
>     # without timeout
>     $poppass_handle = fsockopen($cfgServer, $cfgPort);
> else
>     # with timeout
>     $poppass_handle = fsockopen($cfgServer, $cfgPort, &$errno, &$errstr,
> $cfgTimeOut);
>
> if(!$poppass_handle) {
>     echo " Connetion to server failed . <br> ";
>                 echo " Failed to Change Password ";
>     exit();
> }
> else {
> # now talking to the server to change password.
>                 fputs($poppass_handle, "user $username \r\n");
>                 $tmpa = fgets($poppass_handle, 50);
>                 fputs($poppass_handle, "pass $curpass \r\n");
>                 $tmpb = fgets($poppass_handle, 50);
>                 fputs($poppass_handle, "newpass $newpass \r\n");
>                 $tmpc = fgets($poppass_handle, 3 );
>                 $tmpd = fgets($poppass_handle, 3 );
>
> #500 is first 3 characters returned by the poppassd
> #daemon if current password is incorrect
>
> if ($tmpc == 500)
>          {
>          echo "The Current Password you entered is incorrect <br>";
>          echo "Please go back and change your password again. " ;
>          }
>          else
>          {
>          echo "Password Changed Sucessfully" ;
>          }
>         }
> # now done with it close the connection
> fclose ($poppass_handle)
> ?>
>
> --------------------------------------------------
>
> Thanks,
> Jake
>
>
>
> ----- Original Message -----
> From: "Jake McHenry" <jmchenry oak kcsd k12 pa us>
> To: "RedHat List" <redhat-list redhat com>
> Sent: Friday, February 01, 2002 12:10 AM
> Subject: Re: Validating passwords via perl, Lil help please!
>
>
> > That would help out a lot, maybe then I could either use the php code,
> or
> > somehow use that in my cgi script.
> >
> > Thanks,
> > Jake
> >
> > ----- Original Message -----
> > From: "Peter Kiem" <zordah zordah net>
> > To: <redhat-list redhat com>
> > Sent: Thursday, January 31, 2002 10:55 PM
> > Subject: Re: Validating passwords via perl, Lil help please!
> >
> >
> > > Hi Jake,
> > >
> > > > That is basically what I have now to see if the user exists, but I
> can't
> > use
> > > > this because I'm using shadow passwords, the only thing that is in
> > position
> > > > 2 of /etc/passwd is x. So, anyone know of any other ways that I
> can
> > achieve
> > > > this? Thanks for the help though.
> > >
> > > I did this by installing the poppassd daemon and then writing a PHP
> class
> > to
> > > call poppassd with the username, old password and new password and
> > poppassd
> > > did all the work for me :)
> > >
> > > I guess you could write something similar in Perl.  If you want the
> PHP
> > > source code then let me know.
> > >
> > > --
> > > Regards,
> > > +-----------------------+---------------------------------+
> > > | Peter Kiem            | E-Mail    : <zordah zordah net> |
> > > | Zordah IT             | Mobile    : +61 0414 724 766    |
> > > |   IT Consultancy &    | WWW       : www.zordah.net      |
> > > |   Internet Hosting    | ICQ       : "Zordah" 866661     |
> > > +-----------------------+---------------------------------+
> > >
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > Redhat-list mailing list
> > > Redhat-list redhat com
> > > https://listman.redhat.com/mailman/listinfo/redhat-list
> > >
> > >
> >
> >
> >
> >
> >
> > _______________________________________________
> > Redhat-list mailing list
> > Redhat-list redhat com
> > https://listman.redhat.com/mailman/listinfo/redhat-list
> >
> >
>
>
>
>
> _______________________________________________
> Redhat-list mailing list
> Redhat-list redhat com
> https://listman.redhat.com/mailman/listinfo/redhat-list
>
>
>
> _______________________________________________
> Redhat-list mailing list
> Redhat-list redhat com
> https://listman.redhat.com/mailman/listinfo/redhat-list
>
>






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]