1

Topic: Unable to create new user for domain -ldap error

having problems creating ldap user, getting error can't contact LDAP server, attempted to locate and view logs but was unsuccessful. Can anyone provide any assistance?

I update the variables within the create_mail_user_OpenLDAP.sh script as required.


[root@www tools]# sh create_mail_user_OpenLDAP.sh ofinnigans.com JasonD
ldap_bind: Can't contact LDAP server (-1)
Add new domain: ofinnigans.com.
ldap_bind: Can't contact LDAP server (-1)
ldap_bind: Can't contact LDAP server (-1)
ldap_bind: Can't contact LDAP server (-1)
create_mail_user_OpenLDAP.sh: line 161: slappasswd: command not found
ldap_bind: Can't contact LDAP server (-1)
Create Maildir: /home/vmail/ofinnigans.com/JasonD/.
chown: cannot access `/home/vmail/ofinnigans.com/JasonD/': No such file or directory
chmod: cannot access `/home/vmail/ofinnigans.com/JasonD/': No such file or directory
Send a welcome mail to new user: JasonD@ofinnigans.com

2

Re: Unable to create new user for domain -ldap error

ldap_bind: Can't contact LDAP server (-1)

Is your ldap server running?

create_mail_user_OpenLDAP.sh: line 161: slappasswd: command not found

Do you have openldap related packages installed? In RHEL/CentOS, they are openldap-servers, openldap-clients.

3 (edited by morrisonmd 2009-07-21 23:55:40)

Re: Unable to create new user for domain -ldap error

Wouldn't it have to all be on in order to send emails? For users to login?

The initial user I created works just fine.

I will take a look at these settings later tonight. Thanks for the help.

4

Re: Unable to create new user for domain -ldap error

ok was missing the openldap-servers library, installed that.

Wasn't this library suppose to be installed with iRedmail? Am I missing configuration now?

I went into the ldap

I now get this error.

ldap_bind: Invalid credentials (49)
Add new domain: ofinnigans.com.
ldap_bind: Invalid credentials (49)
ldap_bind: Invalid credentials (49)
ldap_bind: Invalid credentials (49)
ldap_bind: Invalid credentials (49)
Create Maildir: /home/vmail/ofinnigans.com/Jason.D/.
chown: cannot access `/home/vmail/ofinnigans.com/Jason.D/': No such file or directory
chmod: cannot access `/home/vmail/ofinnigans.com/Jason.D/': No such file or directory
Send a welcome mail to new user: Jason.D@ofinnigans.com

do I need to edit the /etc/openldap/slapd.conf

I made changes to the slapd.conf as below

database        bdb
suffix          "dc=ofinnigans,dc=com"
rootdn          "cn=Manager,dc=ofinnigans,dc=com"
# Cleartext passwords, especially for the rootdn, should
# be avoided.  See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
# rootpw               
rootpw                {SSHA}bGfd7/iqgll+IDsD6KzE9tCGRLncIKaR

when i restart ldap i get this error(but I ignore it)

Stopping slapd:                                            [  OK  ]
Checking configuration files for slapd:  bdb_db_open: Warning - No DB_CONFIG file found in directory /var/lib/ldap: (2)
Expect poor performance for suffix dc=ofinnigans,dc=com.
config file testing succeeded
                                                           [  OK  ]
Starting slapd:                                            [  OK  ]

I then edited the create script with the new rootpw

LDAP_SUFFIX="dc=ofinnigans,dc=com"

# Setting 'BASE_DN'.
BASE_DN="o=domains,${LDAP_SUFFIX}"

# Setting 'DOMAIN_NAME' and DOMAIN_DN':
#     * DOMAIN will be used in mail address: ${USERNAME}@${DOMAIN}
#    * DOMAIN_DN will be used in LDAP dn.
DOMAIN_NAME="$1"
DOMAIN_DN="domainName=${DOMAIN_NAME}"
OU_USER_DN="ou=Users"
OU_GROUP_DN="ou=Groups"

# ---------- rootdn of LDAP Server ----------
# Setting rootdn of LDAP.
BINDDN="cn=Manager,${LDAP_SUFFIX}"

# Setting rootpw of LDAP.
BINDPW="bGfd7/iqgll+IDsD6KzE9tCGRLncIKaR"


Still cannot figure out what I am doing wrong.

Thanks again.

5

Re: Unable to create new user for domain -ldap error

Are you sure your iRedMail installed success?
If you use openldap as backend, it should be already installed and configured.

6

Re: Unable to create new user for domain -ldap error

I figgured I'd just do a re install, got it working with MySQL this time, now my only problem is I created additional users, imported them into the database via phpmyadmin, but the users cannot login to webmail.

Any ideas?

7

Re: Unable to create new user for domain -ldap error

In addition to the unable to login, I checked the postmaster mailbox and the welcome email for the user has bounced back.

8

Re: Unable to create new user for domain -ldap error

I guess you can reference http://www.iredmail.org/forum/post723.html#p723 as it seems to be the same problem I am having. I am grabbing my logs now.