LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-16-2008, 04:10 AM   #1
aravind1024004
Member
 
Registered: Mar 2008
Posts: 47

Rep: Reputation: 15
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.
 
Old 07-16-2008, 06:39 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding new users via Shell script coolfrog Linux - General 10 12-05-2010 10:47 AM
Script for adding users BlueStag Linux - General 3 03-14-2006 09:40 PM
script for getting user information from LDAP paul_mat Linux - Networking 1 11-03-2005 08:30 PM
software for adding cddb information into a local mysql database jacksonscottsly Linux - Software 1 07-09-2004 09:21 PM
Script that would automate adding users zyft02 Linux - Newbie 4 02-25-2002 11:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration