LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-15-2009, 06:27 AM   #1
bkcreddy17
Member
 
Registered: Feb 2008
Location: India-Hyderabad
Distribution: RHEL and Fedora
Posts: 171

Rep: Reputation: 15
Smile LDIF file in OpenLDAP


Hi
I am totally new to OpenLDAP. When i am studying openldap pdf's i find that somefile.ldif contains some entries. For example
Code:
# This is the root of the directory tree
dn: dc=example,dc=com
description: Example.Com, your trusted non-existent corporation.
dc: example
o: Example.Com
objectClass: top
objectClass: dcObject
objectClass: organization
# Subtree for users
dn: ou=Users,dc=example,dc=com
ou: Users
description: Example.Com Users
objectClass: organizationalUnit
# Subtree for groups
dn: ou=Groups,dc=example,dc=com
ou: Groups
description: Example.Com Groups
objectClass: organizationalUnit
This file contains 2 OU's Users and Groups. Should we type all this content manually and execute ldapadd/slapadd command? If i want to add another groub or objects to Users OU, should i prepare another sample.ldif fire or what? It was easy to do it in GUI. But i want it to be done in CUI. My whole doubt is about LDIF file. Please clarify my doubt.Thank's in an advance.

Last edited by bkcreddy17; 01-15-2009 at 07:14 AM.
 
Old 01-15-2009, 07:27 AM   #2
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,462
Blog Entries: 6

Rep: Reputation: 51
You can add through commandline too as shown below an example:
Code:
ldapadd -H ldap://ldaphost.example.com -x -D "cn=jimbob,dc=example,dc=com" 
 -f /tmp/addentry.ldif -w dirtysecret
 
Old 01-15-2009, 07:36 AM   #3
bkcreddy17
Member
 
Registered: Feb 2008
Location: India-Hyderabad
Distribution: RHEL and Fedora
Posts: 171

Original Poster
Rep: Reputation: 15
should we create the file "/tmp/addentry.ldif" ? should we add entries in that file and we should exwcute it. Is't it? That's my doubt.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
AWK: convert LDIF file Help Help Help !!!!!!!! haydar68 Programming 15 04-18-2013 01:19 PM
Problem ldif file for ldap finsh Linux - Server 5 01-15-2008 12:16 PM
Trouble adding ldif file iamwilliam Linux - Networking 2 07-21-2006 10:41 AM
openldap ldif file problem iluvatar Linux - Software 3 07-31-2005 07:57 PM
Problem importing LDIF file into OpenLDAP database cboxall Linux - Newbie 1 06-17-2005 10:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:50 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration