self-service-password icon indicating copy to clipboard operation
self-service-password copied to clipboard

Unable to changed the password via email.

Open amar61 opened this issue 4 years ago • 10 comments

Pls help on this,

[Sat Mar 27 17:14:08 2021] [error] [client 192.168.2.40] PHP Notice: Undefined index: HTTP_FORWARDED_PROTO in /usr/share/self-service-password/conf/config.inc.php on line 236, referer: http://192.168.2.10/index.php?action=sendtoken [Sat Mar 27 17:14:08 2021] [error] [client 192.168.2.40] PHP Notice: Undefined index: HTTP_FORWARDED in /usr/share/self-service-password/conf/config.inc.php on line 236, referer: http://192.168.2.10/index.php?action=sendtoken [Sat Mar 27 17:14:08 2021] [error] [client 192.168.2.40] PHP Warning: ldap_get_dn() expects parameter 2 to be resource, boolean given in /usr/share/self-service-password/pages/sendtoken.php on line 99, referer: http://192.168.2.10/index.php?action=sendtoken [Sat Mar 27 17:14:08 2021] [error] [client 192.168.2.40] LDAP - User amar not found, referer: http://192.168.2.10/index.php?action=sendtoken

amar61 avatar Mar 27 '21 12:03 amar61

There should be an issue with the LDAP connection.

You should set $debugto true and check the logs.

coudot avatar Mar 27 '21 13:03 coudot

Thank You for your reply :) PFA Conf File and screenshot, self-service password tab we are able to change the password but not working in email tab anydesk00005 anydesk00006

config.inc.txt sendtoken.txt

amar61 avatar Mar 28 '21 06:03 amar61

anydesk00008 anydesk00007

amar61 avatar Mar 28 '21 06:03 amar61

It's better to copy/paste log files here instead of screenshots.

There is an issue in both cases. For password change, the code tries to read the mail value and found nothing. You may disable notify on changes.

For password reset, your user is not found in the LDAP directory. Check your OpenLDAP logs.

coudot avatar Mar 28 '21 11:03 coudot

can you plz help on this

anydesk00009

======================================================================================= [Sat Apr 03 12:43:42 2021] [notice] [client 192.168.2.40] PHP Notice: Undefined index: HTTP_FORWARDED_PROTO in /usr/share/self-service-password/conf/config.inc.php on line 237, referer: http://192.168.2.10/index.php?action=sendtoken [Sat Apr 03 12:43:42 2021] [notice] [client 192.168.2.40] PHP Notice: Undefined index: HTTP_FORWARDED in /usr/share/self-service-password/conf/config.inc.php on line 237, referer: http://192.168.2.10/index.php?action=sendtoken [Sat Apr 03 12:43:42 2021] [warn] [client 192.168.2.40] PHP Warning: error_log(/var/log/self-service-password): failed to open stream: Permission denied in /usr/share/self-service-password/pages/sendtoken.php on line 195, referer: http://192.168.2.10/index.php?action=sendtoken [Sat Apr 03 12:43:42 2021] [notice] [client 192.168.2.40] send_mail: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting, referer: http://192.168.2.10/index.php?action=sendtoken [Sat Apr 03 12:43:42 2021] [notice] [client 192.168.2.40] Error while sending token to [email protected] (user amar), referer: http://192.168.2.10/index.php?action=

amar61 avatar Apr 03 '21 07:04 amar61

Make sure your apache/php runtime user can write the /var/log/self-service-password file, regarding the Permission denied log.

Could you share your configuration, especially the $mail_* variables - take out any secret. Sounds like the SMTP you're connecting to is wrong. Maybe add $mail_smtp_debug = 1; to your configuration. Check the $mail_smtp_host, $mail_smtp_port. Try to telnet <host> <port>, does it connect?

faust64 avatar Apr 03 '21 08:04 faust64

-rw-------. 1 root root 7298 Mar 27 10:52 secure-20210328 -rwxrwxrwx. 1 root root 437 Apr 3 14:13 self-service-password -rw-------. 1 root root 0 Mar 28 03:09 spooler -rw-------. 1 root root 0 Feb 15 18:29 spooler-20210221 -rw-------. 1 root root 0 Feb 21 03:33 spooler-20210322 -rw-------. 1 root root 0 Mar 22 19:38 spooler-20210328 -rw-r--r--. 1 root root 0 Mar 26 14:09 ssp_error.log -rw-------. 1 root root 0 Feb 15 18:28 tallylog -rw-rw-r--. 1 root utmp 45696 Apr 3 11:49 wtmp -rw-------. 1 root root 13366 Apr 2 08:23 yum.log [root@localhost log]# tail -f self-service-password Send reset URL :///index.php?action=resetbytoken&token=3vUCAJihAbZ1FSNnZpZ42YWdSVo3gXEd%2FTTUJGsF2b%2FPoz%2Fj9WWhYUSIlkFmKmP7539AwSD8nwq4GUUFLC1iEw2h6n8DIJP6V7ugIcRpslkYb1U88E28y4tmglD2v7xzf1EUy5Hz3751qmxmkBg%3D

Mail

#LDAP mail attribute $mail_attribute = "mail";

Get mail address directly from LDAP (only first mail entry)

and hide mail input field

default = false

$mail_address_use_ldap = false;

Who the email should come from

$mail_from = "[email protected]"; $mail_from_name = "Self Service Password"; $mail_signature = "";

Notify users anytime their password is changed

$notify_on_change = true;

PHPMailer configuration (see https://github.com/PHPMailer/PHPMailer)

$mail_sendmailpath = '/usr/sbin/sendmail'; $mail_protocol = 'smtp'; $mail_smtp_debug = 1; $mail_debug_format = 'html'; $mail_smtp_host = '[email protected]'; $mail_smtp_auth = false; $mail_smtp_user = '[email protected]'; $mail_smtp_pass = 'xxxxxxxxx'; $mail_smtp_port = 587; $mail_smtp_timeout = 30; $mail_smtp_keepalive = false; $mail_smtp_secure = 'tls'; $mail_contenttype = 'text/plain'; $mail_wordwrap = 0; $mail_charset = 'utf-8'; $mail_priority = 3; $mail_newline = PHP_EOL;

==============================================================

[root@localhost lib]# [root@localhost lib]# telnet smtp.gmail.com 587 Trying 74.125.24.108... Connected to smtp.gmail.com. Escape character is '^]'. 220 smtp.gmail.com ESMTP 38sm9947302pgk.30 - gsmtp

amar61 avatar Apr 03 '21 09:04 amar61

Any reason your $mail_smtp_auth would be false, when both user and password are set? Also, why does your $mail_smtp_host includes an @? For gmail, I think it should be smtp.gmail.com - as you're testing with telnet.

If you're still having issues after changing those two configuration: anything new out of php / apache logs, having enabled debugs? We might want to raise those even more, I can see someone talking about 4, in PHPMailer/PHPMailer#270 , which mentions a similar error message.

faust64 avatar Apr 03 '21 09:04 faust64

I am getting this error when getting the email tocken Your password was rejected (Extended Operation (1.3.6.1.4.1.4203.1.11.1) not supported)

I tried multiple passwords

adrian-agp avatar Sep 13 '21 21:09 adrian-agp

I am getting this error when getting the email tocken Your password was rejected (Extended Operation (1.3.6.1.4.1.4203.1.11.1) not supported)

I tried multiple passwords

This is not linked to current issue. Do not enable password modify extended operation if your LDAP directory does not support it.

coudot avatar Sep 14 '21 06:09 coudot