LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-01-2005, 02:43 AM   #1
durgap
LQ Newbie
 
Registered: Aug 2005
Posts: 4

Rep: Reputation: 0
LDAP How to add entries


Hi ,

I am setting up ldap server on my local linux server. Just I want to add some user entries into the ldap database.

I want to have only two fields like username and password.
Can some body help me in setting up ldap server.



I am getting problem in adding the entries.

Can you give me the diff file.
~

[root@xidc-jds openldap]# ldapadd -f /tmp/newentry -x -D "cn=root,dc=idc,dc=com
" -w secret -v
ldap_initialize( <DEFAULT> )
ldapadd: no attributes to change or add (entry="(null)")
ldif_record() = 89


The contents of diff file are

uid:admin, uidNumber:100,gidNumber:101, cn=admin, objectClass=users
description: Administrator


Thanks
Regards

Durga
 
Old 10-16-2005, 06:42 AM   #2
klnasveschuk
Member
 
Registered: Jun 2003
Location: Plymouth, Massachusetts
Distribution: CentOS, Slackware, Redhat, Ubuntu
Posts: 52

Rep: Reputation: 15
Your format is wrong

This is probably not the forum for this but maybe this will help:
First you have to have the schemas available for slapd for you to add accounts for example
these are in my slapd.conf file:
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/redhat/autofs.schema
include /etc/openldap/schema/samba.schema
include /etc/openldap/schema/evoldap.schema

The attributes that I add are supported by the schemas

Here is how I add a user account:

ldapadd -c -h <ip address> -x -f file.txt -D "cn=admin,dc=klnc,dc=net" -w <admin passwd>

Contents of file.txt:

dn: uid=brubble,ou=Users,dc=klnc,dc=net
objectClass: inetOrgPerson
objectClass: sambaSAMAccount
objectClass: posixAccount
objectClass: evolutionMailAccount
cn: brubble
sn: Rubble
givenName: Barney
uid: brubble
gecos: System User
description: System User
userPassword: {MD5}/OqSD3QStdp74M9CuMk3WQ==
sambaPwdLastSet: 1129462068
sambaLogonTime: 0
sambaLogoffTime: 2147483647
sambaKickoffTime: 2147483647
sambaPwdCanChange: 1129462068
sambaPwdMustChange: 2147483647
sambaHomeDrive: H:
sambaAcctFlags: [U ]
homeDirectory: /accounts/staff/brubble
loginShell: /bin/bash
sambaPrimaryGroupSID: S-1-5-21-3017333096-1338036268-1958092478-513
sambaHomePath: \\fdc4-1\brubble
sambaLMPassword: 0182BD0BD4444BF8AAD3B435B51404EE
sambaNTPassword: 328727B81CA05805A68EF26ACB252039
sambaLogonScript: klnc.bat
uidNumber: 2209
gidNumber: 500
sambaPasswordHistory: 00000000000000000000000000000000000000000000000000000000
mail: brubble@yahoo.com
evolutionMailTransportURI: smtp://mail.mysmtpserver.com
evolutionMailSourceURI: pop://brubble@mypopmailserver.com
sambaSID: S-1-5-21-3017333096-1338036268-1958092478-5418

The format is very specific and whitespaces can cause it to fail. Hope this gives you a start, there is a steep learning curve.

Kent N
 
Old 10-17-2005, 11:44 AM   #3
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
Which distro are you using ??????

Feedback with your distro.

You better take help of some migration scripts for success in this field. They'll make you learn riding the horse without any prior practice.

Further help will be initiated after you feedback with your distro & version.

But by the time.. You'll be replying to me.
Do confirm...

Where your migration scripts are located.

Quote:
#locate migration
If you get some error like you need to update database or database not present
then run

Quote:
#updatedb
Later check out the path of your migration scripts.
It may be

like /usr/share/openldap/migration/
 
Old 10-20-2005, 01:32 AM   #4
paul_mat
Member
 
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Rep: Reputation: 30
look into phpldapadmin it's a nice web interface into an LDAP server
 
Old 11-10-2006, 04:55 AM   #5
lhrt
Member
 
Registered: Mar 2006
Posts: 82

Rep: Reputation: 15
I am using CentOS 4.2.

I know about migration scripts but I am to add this manually.
. I aded some users who are not system users. But Now i have to ad them in to samba users. I think samba users should also should be system users.

thanks
 
  


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
Can't create LDAP entries with phpldapadmin dlublink Linux - Networking 6 12-12-2007 03:41 AM
Adding entries to an LDAP address book? [GOD]Anck Linux - Software 1 02-10-2005 09:03 AM
LDAP: Cannot add objectClass? Hko Linux - Networking 0 08-17-2004 04:11 PM
How to add manual (x)inetd entries Mon Linux - Software 0 05-30-2004 10:39 AM
how do you add/remove Gnome menu entries manually? randomx Linux - General 2 10-16-2003 10:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:25 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
Open Source Consulting | Domain Registration