LDAP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesLDAP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 8th, 2003, 10:18 AM
ashokvpp ashokvpp is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 52 ashokvpp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 39 m 23 sec
Reputation Power: 0
ldapadd problem

Hi all.................

I have installed openldap successfully with bdb.
I am facing problem with ldapadd details below :

[root@web1 bin]# ldapadd -x -D "cn=root,dc=bsoft,dc=com" -W -f entries1.ldif
Enter LDAP Password:
adding new entry "dc=bsoft, dc=com"
ldap_add: Naming violation
additional info: value of naming attribute 'dc' is not present in entry

ldif_record() = 64
*********************************************************
My entries1.ldif is Below::::::::::::::

dn: dc=bsoft, dc=com
objectclass: dcObject
objectclass: organization
o: bsoft
dc: bsoft.com

dn: mail=root@bsoft.com, dc=bsoft, dc=com
objectclass: inetOrgPerson
cn: Keith
sn: Richards
mail: root@bsoft.com

dn: mail=joe@bsoft.com, dc=bsoft, dc=com
objectclass: inetOrgPerson
cn: Joe
sn: Somebody
mail: joe@bsoft.com

dn: mail=sarah@bsoft.com, dc=bsoft, dc=com
objectclass: inetOrgPerson
cn: Sarah
sn: Nobody
mail: sarah@bsoft.com
telephoneNumber: 23 67 128 5639
*******************************************************

Please can some body help me out to add data to database...............!!!!

Waiting for u'r early replies !!!!!!!!!!!!!!!!!!!!!!!!

Thank'sss in advance

ashok

Reply With Quote
  #2  
Old October 8th, 2003, 11:37 AM
ldap4u's Avatar
ldap4u ldap4u is offline
Chris Larivee
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Littleton, CO
Posts: 72 ldap4u User rank is Private First Class (20 - 50 Reputation Level)ldap4u User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 h 49 m 14 sec
Reputation Power: 6
Send a message via MSN to ldap4u
K - try this instead - your dc didn't match ...

dn: dc=bsoft, dc=com
objectclass: dcObject
objectclass: organization
o: bsoft
dc: bsoft

Reply With Quote
  #3  
Old October 10th, 2003, 10:53 AM
ashokvpp ashokvpp is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 52 ashokvpp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 39 m 23 sec
Reputation Power: 0
ldap add

Hi..

Thank's .......a lot'zzzzzzzzz

I did it .....i am able to add data.

I got struck with one more problem........Could you please help me out !!!!!!!!!!!

Below is the Ldif file , which i want to populate to the database....
when i do :::::

#ldapadd -x -D "cn=root,dc=bsoft,dc=com" -W -f dhi.ldif
Enter LDAP Password:
adding new entry "uid=sample,dc=soft,dc=com"
ldap_add: DSA is unwilling to perform
additional info: referral missing

ldif_record() = 53
****************************************
My dhi.ldif file
****************************************
dn: uid=sample,dc=soft,dc=com
uid: sample
cn: sample
objectclass: top
objectclass: account
objectclass: posixAccount
objectclass: newPilotPerson
objectclass: shadowAccount
loginshell: /bin/bash
homedirectory: /home/sample
userpassword: sample
l: BLR

Can you tell me should i make any changes in schema file....If any please specy.........

Waiting for u'r Early Replies!!!

Best Regards
ashok

Reply With Quote
  #4  
Old October 10th, 2003, 11:30 AM
ldap4u's Avatar
ldap4u ldap4u is offline
Chris Larivee
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Littleton, CO
Posts: 72 ldap4u User rank is Private First Class (20 - 50 Reputation Level)ldap4u User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 h 49 m 14 sec
Reputation Power: 6
Send a message via MSN to ldap4u
ldap add

Looks like you are trying to bind to another directory server or at least another database.

You are binding with a dn "cn=root,dc=bsoft,dc=com" that is not in the same context of the entry you are trying to add "uid=sample,dc=soft ,dc=com"

Those two need dc's need to align - or you need to set a referral back to dc=bsoft,dc=com on your dc=soft,dc=com database ...

Make sense?

Reply With Quote
  #5  
Old October 13th, 2003, 06:22 AM
ashokvpp ashokvpp is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 52 ashokvpp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 39 m 23 sec
Reputation Power: 0
ldapadd

Hi.....

I am sorry ...

#ldapadd -x -D "cn=root,dc=bsoft,dc=com" -W -f dhi.ldif

ERROR:
adding new entry "uid=sample,dc=bsoft,dc=com"
ldap_add:Undefined attribute type
additional info:loginshell: attribute type undefined.

If i remove the line loginshell in my dhi.ldif file....then

I get ERROR:
homedirectory : attribute type undefined.

****************************************
My dhi.ldif file
****************************************
dn: uid=sample,dc=bsoft,dc=com
uid: sample
cn: sample
objectclass: top
objectclass: account
objectclass: posixAccount
objectclass: newPilotPerson
objectclass: shadowAccount
loginshell: /bin/bash
homedirectory: /home/sample
userpassword: sample
l: BLR

Can you tell me... should i make any changes in schema file???....If any please specify.........

Waiting for u'r Early Replies!!!

Best Regards
ashok

Reply With Quote
  #6  
Old October 13th, 2003, 10:29 AM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Psycho Canadian
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jan 2001
Location: Canada
Posts: 4,793 Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 4 Weeks 23 h 20 sec
Reputation Power: 437
Quote:
additional info:loginshell: attribute type undefined.

if I understand correctly, this error means loginshell isn't in your schema so it can not add it.
__________________
Miscellaneous Software
Viper_SB
Developershed E-Support


Anyone else play chess?
Challenge me

Reply With Quote
  #7  
Old October 14th, 2003, 07:06 AM
ashokvpp ashokvpp is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 52 ashokvpp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 39 m 23 sec
Reputation Power: 0
ldapadd

Hi......all

Below is my dhi.ldif file

**********************

dn: uid=Lin,dc=bsoft, dc=com
uid: Lin
cn: Lin
objectclass: top
objectclass: account
objectclass: posixAccount
objectclass: newPilotPerson
objectclass: shadowAccount
loginshell: /bin/bash
homedirectory: /home/Lin
userpassword: Linmaster
l: BLR
maxlogins: 1
currentlogins: 0
usedtime: 0
rategroupid: G002

*********************************

I want to populate the above data to my ldap database , Please tell me what are
all the changes should i make in schema file.

Other than schema files if any please specify!!!

Waiting for U'r Early Replies !!!

Thank U

Best Regards
ashok

Reply With Quote
  #8  
Old October 14th, 2003, 11:09 AM
ldap4u's Avatar
ldap4u ldap4u is offline
Chris Larivee
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Littleton, CO
Posts: 72 ldap4u User rank is Private First Class (20 - 50 Reputation Level)ldap4u User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 h 49 m 14 sec
Reputation Power: 6
Send a message via MSN to ldap4u
Viper_SB is right - you need to add these attributes to your schema - once that is done correctly you will no longer see those errors.

To do that just include another schema file in your slapd.conf:

include /etc/openldap/schema/local.schema

Then create a file in that location called local.schema - make it look like the other included schema files - but don't duplicate the OID's ....

Reply With Quote
  #9  
Old October 14th, 2003, 12:17 PM
ashokvpp ashokvpp is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 52 ashokvpp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 39 m 23 sec
Reputation Power: 0
ldapadd

Hi...........
Thank's a lot'zzz for u'r help & guidance.........

I read about Schemas in openldap.org/docs/..............
i was not able to understand , i could only understand very little..............

As you told to include another schema file in slapd.conf

include /etc/openldap/schema/local.schema

This i have done........

I am getting confused how exactly this local.schema file should look like..............

Please , kindly i request you to provide me the local.schema file for my requirnments.i,e (with respect to dhi.ldif file).............

I shall analyse your local.schema...further i can create of my own...........in future..

Please Help me !!!

Waiting for U'r early replies!!!

Thanku

Best Regards
ashok

Reply With Quote
  #10  
Old October 14th, 2003, 12:25 PM
ldap4u's Avatar
ldap4u ldap4u is offline
Chris Larivee
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Littleton, CO
Posts: 72 ldap4u User rank is Private First Class (20 - 50 Reputation Level)ldap4u User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 h 49 m 14 sec
Reputation Power: 6
Send a message via MSN to ldap4u
The local.schema file should look like the other schema files in the schema directory.

Just take a look at http://www.openldap.org/doc/admin21/schema.html and see what you can do ...

Reply With Quote
  #11  
Old October 17th, 2003, 12:27 PM
ashokvpp ashokvpp is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 52 ashokvpp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 39 m 23 sec
Reputation Power: 0
ldapadd

Hi...friends...............


I studied the complete document of schema.html ....i was very much confused with specifying OID...i am not understanding how exactly i should use & develop my schema file ...with attributetypes & objectclass according to my requirnments...............

I request u to please provide me local.schema according to my dhi.ldif file..........

dn: uid=Lin,dc=bsoft, dc=com
uid: Lin
cn: Lin
objectclass: top
objectclass: account
objectclass: posixAccount
objectclass: newPilotPerson
objectclass: shadowAccount
loginshell: /bin/bash
homedirectory: /home/Lin
userpassword: Linmaster
l: BLR
maxlogins: 1
currentlogins: 0
usedtime: 0
rategroupid: G002

I shall study further..................

Waiting For U'r Replies!!!

Best Regards
ashok

Reply With Quote
  #12  
Old October 17th, 2003, 01:10 PM
ldap4u's Avatar
ldap4u ldap4u is offline
Chris Larivee
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Littleton, CO
Posts: 72 ldap4u User rank is Private First Class (20 - 50 Reputation Level)ldap4u User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 h 49 m 14 sec
Reputation Power: 6
Send a message via MSN to ldap4u
I hate to keep pointing you to links - but I hate to type out long replies. This really should help you solve your problems - as I assume you are trying to configure for Solaris authentication on an openLDAP server. All you will need to do is create the file and cut and paste the info provided - then make sure you are including that file in startup:

http://www.ypass.net/solaris8/openldap/nisschema.html

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesLDAP Programming > ldapadd problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |