LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   script for adding users information in ldap database (https://www.linuxquestions.org/questions/linux-server-73/script-for-adding-users-information-in-ldap-database-656085/)

aravind1024004 07-16-2008 04:10 AM

script for adding users information in ldap database
 
hi,

i had configured openldap in RHEL 5.
It was in master/slave replication in syncrepl method (refreshOnly) method.

I had to add users information in the ldap database.
Nearly 15000 users are there so i can able to add all the 15000 users infromation at a time.

so i need a script or some utility to add all the user infromation at the same time. Am using LDAP Browser for adding the entries now.

so plz help me how to add all the users information at single time.

druuna 07-16-2008 06:39 AM

Hi,

You can use ldapadd (or ldapmodify, depending on what is already present) and a valid ldif file to add these users.

The ldif file should contain the valid parts, something like this (first 1,5 users):

Quote:

dn: cn=Barbara Jensen,dc=example,dc=com
objectClass: person
cn: Barbara Jensen
cn: Babs Jensen
sn: Jensen
title: the world’s most famous mythical manager
mail: bjensen@example.com
uid: bjensen

dn: cn=Jacques Jensen,dc=example,dc=com
objectClass: person
cn: Jacques Jensen
cn: Jade Jensen
.
.
.
Using ldap <options> -f 15000.users.ldif the content of 15000.users.ldif will be added to the ldap database.

Take a look at the ldapadd manpage for details.

Hope this helps.


All times are GMT -5. The time now is 12:22 AM.