[imp] change password

Darci Tartari dtartari@portoriogrande.com.br
Fri, 18 Jan 2002 10:07:59 -0200


I am  running Horde 2.1-cvs, IMP 3.1-cvs and Turba 1.1-cvs, PHP-4.1.1 
with FTP, Gettext, IMAP, MCAL, Mcrypt, MySQL, PostgreSrunningQL, XML 
support modules, apache 1.3.22 +mod_ssl 2.8.5 in FreeBSD 4.4 box.

I installed your patch to make possible my clients change their password 
using poppasswd.  I tested poppasswd by telneting port 106 and it's 
working good.

When I try to change the password trough IMP using your patch it gives 
me the page to fill the old and the new password as expected but when I 
submit the form it gives the error:

Warning: Undefined property: fp in 
/usr/local/data.default/horde/passwd/poppassd.php on line 21

I tried to look at poppassd.php on line 21 to guess what is happening 
but I must confess my knowledge in PHP is not so great. In fact its poor !

So I came here to find someone who could help me to solve this problem.

Thanks a lot !

Darci Tartari

Joseph Kacmarcik wrote:

>ha! not quite. i'm not into all that.
>
>here's what i know how to esplain:
>
>added to $HORDE_BASE/config/registry.php: (my DocumentRoot is ../horde/ so 
>make changes if neccessary)
>
>$this->applications['passwd'] = array(
>    'fileroot' => dirname(__FILE__) . '/../passwd',
>    'webroot' => '/passwd',
>    'icon' => '/graphics/login.gif',
>    'name' => 'Password',
>    'allow_guests' => true,
>    'show' => true
>);
>
>i've attached a file that belongs in $HORDE_BASE/passwd/index.php
>
>you'll obviously need to have the poppassd daemon running (defaults to tcp 
>port 106). you can block tcp/106 from the outside cuz requests from the horde 
>framework come from localhost.
>
>after that, i've also attached poppassd.php which normally belongs here: 
>/usr/local/lib/php/poppassd.php
>
>my poppassd installation gave me /usr/local/libexec/poppassd, but others may 
>be different.
>
>if it doesn't work, check your system logs for poppassd errors first. my 
>config was goofed up at first, cuz the port in poppassd.php was set to '0'. if 
>you use the one that's attached, it should work ok.
>
>others may find a cleaner way to do this, but this solution works for me and 
>the client. (:
>
>lemme know if ya need more info.
>good luck!
>joe
>
>Quoting Frederic Trudeau <ftrudeau@cam.org>:
>
>>Interesting ... Got the patch ?
>>
>>
>>-- 
>>Frederic Trudeau
>>
>>
>>[A]dvanced [S]upport [A]gent
>>Colocation/Customer Support Agent
>>CAM Internet -> http://www.cam.org
>>->
>>
>>
>>Surlignage Joseph Kacmarcik <joe@chubbo.net>:
>>
>>>if nobody else pipe's up here, i kinda rolled my own using poppassd. i 
>>>modified /horde/config/registry.php to show 'Password' in the toolbar as
>>>well. 
>>>gives it that fluffy gooey fuzzy feeling peeps like. (:
>>>
>>>incredibly insecure if your'e not running SSL, so beware.
>>>
>>>lemme know if your'e interested! i'd be interested to hear other war
>>>
>>stories
>>
>>>too...
>>>
>>>joe
>>>
>>>Quoting Irlanda Delgado <Irlanda.Delgado@mific.gob.ni>:
>>>
>>>>Hello,
>>>>
>>>>is there a choice and the webmail of horde+imp where the users can
>>>>
>>change
>>
>>>>their passwords?
>>>>
>>>>Thank you.
>>>>
>>>>Irlanda
>>>>
>>>>
>>>>-- 
>>>>IMP mailing list: http://horde.org/imp/
>>>>Archive: http://marc.theaimsgroup.com/?l=imp&r=1&w=2
>>>>Frequently Asked Questions: http://horde.org/faq/
>>>>To unsubscribe, mail: imp-unsubscribe@lists.horde.org
>>>>
>>>>
>>>
>>>
>>>-- 
>>>IMP mailing list: http://horde.org/imp/
>>>Archive: http://marc.theaimsgroup.com/?l=imp&r=1&w=2
>>>Frequently Asked Questions: http://horde.org/faq/
>>>To unsubscribe, mail: imp-unsubscribe@lists.horde.org
>>>
>>>
>>
>>-------------------------------------------------
>>This mail sent through IMP: http://horde.org/imp/
>>
>>-- 
>>IMP mailing list: http://horde.org/imp/
>>Archive: http://marc.theaimsgroup.com/?l=imp&r=1&w=2
>>Frequently Asked Questions: http://horde.org/faq/
>>To unsubscribe, mail: imp-unsubscribe@lists.horde.org
>>
>>
>
>
>
>
>------------------------------------------------------------------------
>
><?
>  class poppassd {
>
>  var $fp;
>  var $err_str;
>
>  function connect() {
>    $fp = fsockopen("localhost", 106, &$err_no, &$err_str);
>    if (!$fp) {
>      $this->err_str = $err_str;
>    } else {
>      $this->fp = $fp;
>      if ($this->get_prompt()) {
>        return true;
>      }
>    }
>    return false;
>  }
>
>  function disconnect() {
>    if ($this->fp) {
>      fputs($this->fp, "quit\n");
>      fclose($this->fp);
>    }
>  }
>
>  function get_prompt() {
>    $prompt = fgets($this->fp, 4096);
>    if (substr($prompt, 0, 3) == "200") {
>      return true;
>    } else {
>      $this->err_str = $prompt;
>      return false;
>    }
>  }
>
>  function change_password($user_name, $old_password, $new_password) {
>    $return_value = false;
>    if ($this->connect()) {
>      if ($this->send_user_name($user_name)) {
>        if ($this->send_old_password($old_password)) {
>          if ($this->send_new_password($new_password)) {
>            $return_value = true;
>          }
>        }
>      }
>    }
>    $this->disconnect();
>    return $return_value;
>  }
>
>  function send_user_name($user_name) {
>    fputs($this->fp, "user $user_name\n");
>    return $this->get_prompt();
>  }
>
>  function send_old_password($password) {
>    fputs($this->fp, "pass $password\n");
>    return $this->get_prompt();
>  }
>
>  function send_new_password($password) {
>    fputs($this->fp, "newpass $password\n");
>    return $this->get_prompt();
>  }
>
>}
>?>
>