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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Please let me know where exactly the ldap databases are stored . I use the default bdb databases with ldap .
Also please let me know how I can backup and restore the ldap databases in case of a server crash .
Thanks for the response bathory . Where are all the ldap databases stored ? As mentioned in slapd.conf , they are stored as .bdb databases in
/var/lib/ldap folder . I was successfully able to query the database even after moving them to another location . Are the databases really located there ? How do I restore the backed up databases in case of a server
crash ? do I have to delete the old databases and restore from the ldif files created by slapcat ? Please let me know .
As mentioned in slapd.conf , they are stored as .bdb databases in
/var/lib/ldap folder . I was successfully able to query the database even after moving them to another location . Are the databases really located there ?
The databases are located where slapd.conf says. I guess that you didn't restart slapd after moving them, so you got an cached answer.
Anyway you should stop slapd and delete the contents of the above mentioned directory when you want to do a restore using slapadd. Take a look at this and this for more details.
Thanks you so much .
And yes I didn't restart ldap after moving the dbs to a separate location . I am very new to ldap and just testing my server before actually deploying it .
In the slapd.conf file I made sure to include /etc/openldap/schema/inetorgperson.schema
But when I use the password migration script to convert password map to ldif format I always see that only
'account' comes up as the default object class in the ldif files . Here is an example of what one of the ldif entries looks like :
--------------------------------------------
dn: uid=axe,ou=People,dc=example,dc=com
uid: axe
cn: axe
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword: {crypt}$1$8EJTU0c0$O2oc9gwyMJZl0hFg7x6Y7.
shadowLastChange: 12371
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 500
gidNumber: 500
homeDirectory: /home/axe
--------------------------------------------
How do I make sure that inetorgperson comes up as the default object class without having to add it manually .
Also is it possible to change the object class of a record to another object class from a different tree ? Should I delete the existing record to make this change ?
There is no default objectclass. If "objectClass: inetOrgPerson" does not exist you should add it.
Quote:
Also is it possible to change the object class of a record to another object class from a different tree ? Should I delete the existing record to make this change ?
I'm afraid I don't understand what you mean by that.
I changed the object class in the ldif file mentioned from 'account' to 'inetorgperson' and tried to modify it with
ldapmodify -x -D "cn-Manager,dc=example,dc=com" -W -f /etc/openldap/axe.ldif
and the answer was something like object class violation and the verbose result says that modification of object class from account to inetorgperson is not allowed . Is this kind of a change posssible ? If so how to achieve it ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.