1 (edited by redshirt 2011-12-12 09:28:04)

Topic: reseting iredadmin and phpLDAPadmin passwords

Hello!

I have a few problems with my server after a power outage. I'll post later on others if need be, but at the moment, I cannot log into both iredadmin and phpLDAPadmin. I would like to reset the passwords for those. Also, I would like to set the default manager login to admin@mail.myserver.net. I haven't found a similar topic in the forums yet.

BTW, in slapd.conf it seems to want {SSHA} , whereas phpLDAPadmin config.php wants md5 for 'password_hash' .

Not sure if that is a real conflict. Mainly want to set new passwords and see if I can login through the web interfaces.

Any help is appreciated!

==== Basic information  ====
- iRedMail version: 0.7.1
- Linux/BSD distribution name and version: freebsd 8.0 via PC-BSD ; iredmail in jail
- Any related log? Log is helpful for troubleshooting.
====

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: reseting iredadmin and phpLDAPadmin passwords

Steps:

- Set rootpw to a plain password in slapd.conf
- Restart OpenLDAP service
- Login to phpLDAPadmin with this new password
- Change other passwords if you want

3

Re: reseting iredadmin and phpLDAPadmin passwords

OK, sorry in advance for my confusion. I think openldap defaults to ssha encryption. How do I force a plain password? Also, as I haven't had to login for awhile, I'm not sure if the login is root@domain or Manager@domain. Either way though I get this error:

Unable to connect to LDAP server My LDAP Server
Error: Invalid DN syntax (34) for user
error    Failed to Authenticate to server
Invalid Username or Password.

This is the same error I get for all attempts.

4

Re: reseting iredadmin and phpLDAPadmin passwords

redshirt wrote:

I think openldap defaults to ssha encryption. How do I force a plain password?

In slapd.conf, you can use a plain password directly. For example:

rootpw 123456

Replace "123456" by your plain password, then restart OpenLDAP service.

If you want to set a plain password for mail user, please login to phpLDAPadmin, expand LDAP tree in left panel, find the user you want to update, click the user object in left panel, phpLDAPadmin will show you all LDAP attributes/values in right panel, find attribute "userPassword" in right panel, choose "clear" in its drop-down menu list, then input a new password, it will be stored in plain text.

redshirt wrote:

Also, as I haven't had to login for awhile, I'm not sure if the login is root@domain or Manager@domain. Either way though I get this error:

Unable to connect to LDAP server My LDAP Server
Error: Invalid DN syntax (34) for user
error    Failed to Authenticate to server
Invalid Username or Password.

This is the same error I get for all attempts.

You can find all accounts in the iRedMail installation directory. For example, if your iRedMail installation directory is /root/iRedMail-0.7.3/, iRedMail will generate a new file "/root/iRedMail-0.7.3/iRedMail.tips" which contains all mail server related accounts (and password, of course).

5

Re: reseting iredadmin and phpLDAPadmin passwords

Well, based on your feedback, I can now log into iredadmin. (Looked up the password in the .tips file you mentioned.)

Nevertheless, neither the old password or new password I set for openldap in slapd.conf will let me log into phpldapadmin. I am setting the password as you mentioned. The error is the same.

I don't know if this is somehow related to the bigger problem I am having. After the power outage and reboot, I can no longer reach roundcube by the server name on the local network, but it works fine if I use the server IP address like: https://ipaddress/mail/. I can reach roundcube fine on the server proper. Of course, I can no longer receive email since the server is not responding to its name over the internet. Haven't had much of a chance to look at this in depth yet.

6

Re: reseting iredadmin and phpLDAPadmin passwords

OK. Made quick progress. I guess the internet problem might be that pf (packet filter) did not load right. (I think I had manually loaded a known good config, but forgot to make the final changes in pf.conf.) After fixing pf.conf, I can now see the webmail correctly.

So this just leaves the phpldapadmin interface. Is there a way to check the password via command line?

7

Re: reseting iredadmin and phpLDAPadmin passwords

redshirt wrote:

Nevertheless, neither the old password or new password I set for openldap in slapd.conf will let me log into phpldapadmin. I am setting the password as you mentioned. The error is the same.

Which account did you use to login to phpLDAPadmin? It should be "cn=Manager,dc=xxx,dc=xxx" (it's called as LDAP full dn) by default, you can find this dn in iRedMail.tips.