[SOLVED] Unable to chown a directory to a user on LDAP Server
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Unable to chown a directory to a user on LDAP Server
Hi,
I am using RHEL5.1 distribution. Openldap-server version is openldap-servers-2.3.27-8.
I have detailed only the steps which are confusing me/are not in accordance to the link-http://www.linuxhomenetworking.com/w...DAP_and_RADIUS
Now; as per the link
...I ran the command
1.
Code:
# cp -rv * /usr/share/openldap/migration/
My action:It asked me for overwriting the files. I said 'yes' for all.
2.
Quote:
# locate DB_CONFIG
On the link's output:/usr/share/doc/openldap-servers-2.4.16/DB_CONFIG.example
On my distro: /etc/openldap/DB_CONFIG.example
Hence; I issued
The contents of /root/migrerr {This file contains errors of the script.}are:
-------------------------------------------------------------------------------------
slapadd: line 5: database (dc=example,dc=com) not configured to hold "dc=padl,dc=com"
slapadd: line 5: database (dc=example,dc=com) not configured to hold "dc=padl,dc=com"
-------------------------------------------------------------------------------------
On both server & client machine;
4. Output of the command->
Do you actually have users in your ldap directory? To me, it looks like you don't have any... Furthermore have you set up /etc/ldap.conf, /etc/openldap/ldap.conf and /etc/nsswitch.conf?
What does 'getent passwd' return? Does it contain the users, if they exist, in the ldap directory?
My LDAP server's IP address is 192.168.0.7.
I have not yet implemented Secure LDAP.
Quote:
Do you actually have users in your ldap directory?
I ran the Offline migration script on LDAP server. Does this populate the ldap directory with users from my LDAP Server's passwd file? Is ldapsearch the command to search for users in my ldap directory? I have shown the output of it in my previous post. But, I dont understand the meaning.
Quote:
To me, it looks like you don't have any... Furthermore have you set up /etc/ldap.conf, /etc/openldap/ldap.conf and /etc/nsswitch.conf?
Yes. I have set them up on the client side.
Following are their contents->
/etc/ldap.conf
Code:
base dc=example,dc=com
timelimit 120
bind_timelimit 120
idle_timelimit 3600
nss_initgroups_ignoreusers root,ldap,named,avahi,haldaemon,dbus,radvd,tomcat,radiusd,news,mailman
uri ldap://192.168.0.7/
ssl no
tls_cacertdir /etc/openldap/cacerts
pam_password md5
/etc/openldap/ldap.conf
Code:
BASE dc=example,dc=com
URI ldap://192.168.0.7/
TLS_CACERTDIR /etc/openldap/cacerts
The migration tool probably creates an ldif file or maybe you have to add the ldif filename to CLI command (not really sure about that, been to long ago that I have done this). This ldif you have to add to your ldap directory with the slapadd command. Don't forget to stop the ldap service when you are going to do this.
Forgot to mention this in my previous post, but ldapsearch is the correct client tool to list the contents of your ldap directory.
This is some example output when I run ldapsearch on my systems:
I just saw that you already used slapadd... The 2 errors you got mean that you didn't set the correct domain in your migration tool configuration.
You are trying to add dc=padl,dc=com attributes to a directory that is configured to use dc=example,dc=com. This is not possible and will fail.
As BlueIce correctly pointed out; the settings file had to be changed. But; sometimes it worked & sometimes it did not. I am still perplexed about this Yes!!! It works/No!!! it is not working. Still trying to figure out. But; I will mark this thread as solved.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.