LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 08-29-2007, 06:28 AM   #1
narendra.pant
Member
 
Registered: Mar 2006
Posts: 86

Rep: Reputation: 15
ldap server setup


while setting up the ldap servr

i was adding the file using ldapadd

it is alwasy saying invalid credentials (49)

can yu suggest what might be the prob
 
Old 08-29-2007, 07:42 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Hi,

You don't show us the command that was used......

Only thing I can come up with: Are you using SASL or simple authentication?
If it is the latter: did you use the -x switch?

Hope this helps.
 
Old 08-29-2007, 07:55 AM   #3
miedward
Member
 
Registered: Feb 2007
Distribution: RHEL 4, SOLARIS 10
Posts: 91

Rep: Reputation: 15
The default permisions for openldap (assuming here since you didn't mention) are for all users to have read permission only. The only user who is able to do an add by default is the manager account which you would have to specify specifically with your command line each time. So even if you are running as the machine's root, that user has no special permissions with LDAP to use ldapadd unless you go out of your way to give it them (which is probably a bad idea).

You might look at this project for ldap account management. It is easy to use and I really like the way it sets up the user accounts. Much easier than doing everything by hand.

http://lam.sourceforge.net/

If you post your command syntax (no passwords please!) and what versions of Linux and ldap you are using we can try to help you debug it.
 
Old 08-30-2007, 01:06 AM   #4
narendra.pant
Member
 
Registered: Mar 2006
Posts: 86

Original Poster
Rep: Reputation: 15
i m setting it up as the admin
on RHEL 5

ya i hav specified the root/admin/manager for ldap

i m using the simple authentication ya -x was used

i m pasting the commands which i used


what i did

i edited the /etc/openldap/slapd.conf

in the suffix i wrote

suffix "dc=cs,dc=gbpuat-tech,dc=ac,dc=in"
rootdn "cn=npant,dc=gbpuat-tech,dc=ac,dc=in"


rootpw <password>



them i edited the
/usr/share/openldap/migration/migrate_common.ph

file and specified the Default base there


"dc=cs,dc=gbpuat-tech,dc=ac,dc=in"

after the i started the ldap service

and then created the passwd.LDIF file

now when i m adding it with ldapadd

ldapadd -x -h cpm10 -D "cn=npant,dc=cs,dc=gbpuat-tech,dc=ac,dc=in" -w <password> -f passwd.LDIF

or various combinations of this command as specifying the filename first ,,, like that

it is always saying invalid credentials (49)

this is the problem

i hav specified al the infod after teh -D correctly still it is not working

my domainname is cs.gbpuat-tech.ac.in and hostname is cpm10

thnx
 
Old 08-30-2007, 06:49 AM   #5
miedward
Member
 
Registered: Feb 2007
Distribution: RHEL 4, SOLARIS 10
Posts: 91

Rep: Reputation: 15
What happens when you do something like
ldapsearch -x '(ObjectClass=*)'

It will probably return no records, but it ought to let you connect.

Also if you specify the host, it is possible that it is sending traffic outside your box. Do you have a firewall on that box? You might try without the -h (you shouldn't need it on the local box anyway).

Also, double check and make sure you don't have any of the security turned on (TLS, ssl, SASL, whatever). Get it working locally without the security turned on (just take it off the network if you are concerned about security), then play with the security settings later.

Also, you do have to add the base DN and such first before you add user information, though that is a different error message
 
Old 08-30-2007, 08:33 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Hi,

Is this correct (slapd.conf entry)?

suffix "dc=cs,dc=gbpuat-tech,dc=ac,dc=in"
rootdn "cn=npant,dc=gbpuat-tech,dc=ac,dc=in"

Shouldn't that be:

suffix "dc=cs,dc=gbpuat-tech,dc=ac,dc=in"
rootdn "cn=npant,dc=cs,dc=gbpuat-tech,dc=ac,dc=in"

You are trying to access this: -D "cn=npant,dc=cs,dc=gbpuat-tech,dc=ac,dc=in"

Hope this helps.
 
Old 08-31-2007, 02:10 AM   #7
narendra.pant
Member
 
Registered: Mar 2006
Posts: 86

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by druuna View Post
Hi,

Is this correct (slapd.conf entry)?

suffix "dc=cs,dc=gbpuat-tech,dc=ac,dc=in"
rootdn "cn=npant,dc=gbpuat-tech,dc=ac,dc=in"

Shouldn't that be:

suffix "dc=cs,dc=gbpuat-tech,dc=ac,dc=in"
rootdn "cn=npant,dc=cs,dc=gbpuat-tech,dc=ac,dc=in"

You are trying to access this: -D "cn=npant,dc=cs,dc=gbpuat-tech,dc=ac,dc=in"

Hope this helps.

sorry .. i hav enter it correctly there ,,, typo
 
  


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
LDAP: Can't contact master ldap server rulirahm Linux - Networking 2 07-14-2014 02:02 AM
authenticating through one ldap server that uses other ldap servers & active director dreamm Linux - Server 1 02-21-2007 08:22 AM
LDAP server not starting as user LDAP klnasveschuk Fedora 1 02-15-2007 04:49 AM
ldap setup for authentication rexthecoollion Suse/Novell 2 04-14-2006 02:18 AM
getting ldap setup aaronj Linux - Software 2 08-31-2004 08:30 PM


All times are GMT -5. The time now is 12:13 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration