I'm bringing up openldap, and I have almost everything working except:
The servers have an existing ldap.conf of: uri ldap://ldap001.example.com ldap://ldap002.example.com base dc=example,dc=com binddn uid=server,cn=config bindpw xxxxxx ldap_version 3 ...etc...
I'm having trouble figuring out how to create a user that looks like: uid=server,cn=config,dc=example,dc=com
I'd prefer not to visit all the servers to change their ldap.conf files, rather, I'd like to swap out the name service records to point to openldap. To do this, I need to create the uid=server,cn=config user.
Any suggestions? Do I have to build up a new schema entry?
Thanks, </edg> Ed Greenberg
Ed Greenberg writes:
I'm bringing up openldap, and I have almost everything working except:
The servers have an existing ldap.conf of:
ldap.conf for pam_ldap (typically /etc/ldap.conf) and not openldap (typically /etc/(open)ldap/ldap.conf), I presume. OpenLDAP ldap.conf does not have ldap_version and bindpw keywords.
uri ldap://ldap001.example.com ldap://ldap002.example.com
I hope you use TLS as well, otherwise passwords get sent in cleartext over the connection. And to use TLS, the server needs a certificate - and the clients must know the CA-certificate which signed it so they can authenticate the server.
base dc=example,dc=com binddn uid=server,cn=config bindpw xxxxxx
The "binddn" value is absolute, not relative to the "base". So use: binddnuid=server,cn=config,dc=example,dc=com
Except it's a bad idea to spread extended access to the LDAP server to machines all over campus. Presumably you use binddn/bindpw so PAM can read the users' passwords? Instead set up PAM to authenticate users with the LDAP Bind operation. (Bind sends the password to the LDAP server, which checks if is correct and returns success or error.)
I'm having trouble figuring out how to create a user that looks like: uid=server,cn=config,dc=example,dc=com
Well, if you do it anyway - something like this:
Include cosine.schema after core.schema in slapd.conf, if you haven't already. (For the 'account' object class, used below.)
$ /usr/sbin/slappasswd -s 'the password' {SSHA}sWpsmsuoIekmk+KANtZ0RLfRfhyA24W9
Create a file server.ldif with:
dn: uid=server,cn=config,dc=example,dc=com uid: server objectClass: account objectClass: simpleSecurityObject userPassword: {SSHA}sWpsmsuoIekmk+KANtZ0RLfRfhyA24W9
bin/ldapadd it to the server, or take the server down and then sbin/slapadd it.
Seems your moderator made a mistake in approving this thread, it likely should have been redirected to the openldap-technical list to begin with. I'm now closing it. -- Your moderator
On Aug 12, 2008, at 11:50 AM, Ed Greenberg wrote:
I'm bringing up openldap, and I have almost everything working except:
The servers have an existing ldap.conf of: uri ldap://ldap001.example.com ldap://ldap002.example.com base dc=example,dc=com binddn uid=server,cn=config bindpw xxxxxx ldap_version 3 ...etc...
I'm having trouble figuring out how to create a user that looks like: uid=server,cn=config,dc=example,dc=com
I'd prefer not to visit all the servers to change their ldap.conf files, rather, I'd like to swap out the name service records to point to openldap. To do this, I need to create the uid=server,cn=config user.
Any suggestions? Do I have to build up a new schema entry?
Thanks,
</edg> Ed Greenberg
openldap-software@openldap.org