LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-09-2011, 06:38 AM   #1
kathirvel
Member
 
Registered: Jan 2011
Location: Bangalore
Distribution: RHEL,OEL
Posts: 60

Rep: Reputation: 0
LDAP server


My slapd.conf file


# This file should NOT be world readable.
#
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema

# Allow LDAPv2 client connections. This is NOT the default.
allow bind_v2

# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org

pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args

# Load dynamic backend modules:
# modulepath /usr/lib/openldap#######################################################################
# ldbm and/or bdb database definitions
#######################################################################

database bdb
suffix "dc=www,dc=ycsmumldap,dc=com"
rootdn "cn=Manager,dc=www,dc=ycsmumldap,dc=com"
# Cleartext passwords, especially for the rootdn, should
# be avoided. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw {SSHA}7OcFiJgR39BbA7Oj+K4nGEbr33VkNYRH
# rootpw {crypt}ijFYNcSNctBYg

# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory /var/lib/ldap/ycsmumldap.com

# Indices to maintain for this database
index objectClass eq,pres
index ou,cn,mail,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub
index nisMapName,nisMapEntry eq,pres,sub
# Replicas of this database
#replogfile /var/lib/ldap/openldap-master-replog



My ldapsearch result is as follows

[root@www ycsmumldap.com]# ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts
# extended LDIF
#
# LDAPv3
# base <> with scope baseObject
# filter: (objectclass=*)
# requesting: namingContexts
#

#
dn:
namingContexts: dc=www,dc=ycsmumldap,dc=com

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1
[root@www ycsmumldap.com]#

I hope the configuration is correct







Next ldapadd gave error.The error is as follows

[root@www ycsmumldap.com]# ldapadd -f /ldapusers/user.ldif -x -D "cn=Manager,dc=www,dc=ycsmumldap,dc=com" -w link@123
adding new entry "dc=www,dc=ycsmumldap,dc=com"
ldapadd: Naming violation (64)
additional info: value of naming attribute 'dc' is not present in entry

[root@www ycsmumldap.com]#






My user.ldif file configuration is

dn: dc=www,dc=ycsmumldap,dc=com
dc: ycsmumldap
objectClass: dcObject
objectClass: organizationalUnit
o: ycsmumldap

dn: cn=Manager,dc=www,dc=ycsmumldap,dc=com
objectClass: organizationalUnit
cn: Manager



please let me know what i should do.............



Thanks in advance
by
kathirvel.s
 
Old 05-09-2011, 09:54 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,681

Rep: Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971
Quote:
Originally Posted by kathirvel View Post
My slapd.conf file

My ldapsearch result is as follows
[root@www ycsmumldap.com]# ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts
# extended LDIF
#
# LDAPv3
# base <> with scope baseObject
# filter: (objectclass=*)
# requesting: namingContexts
#

#
dn:
namingContexts: dc=www,dc=ycsmumldap,dc=com

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1
[root@www ycsmumldap.com]#

I hope the configuration is correct

Next ldapadd gave error.The error is as follows
[root@www ycsmumldap.com]# ldapadd -f /ldapusers/user.ldif -x -D "cn=Manager,dc=www,dc=ycsmumldap,dc=com" -w link@123
adding new entry "dc=www,dc=ycsmumldap,dc=com"
ldapadd: Naming violation (64) additional info: value of naming attribute 'dc' is not present in entry

My user.ldif file configuration is
dn: dc=www,dc=ycsmumldap,dc=com
dc: ycsmumldap
objectClass: dcObject
objectClass: organizationalUnit
o: ycsmumldap

dn: cn=Manager,dc=www,dc=ycsmumldap,dc=com
objectClass: organizationalUnit
cn: Manager
This particular error has been covered on here several times:
http://www.linuxquestions.org/questi...n-64-a-385424/
http://www.linuxquestions.org/questi...n-64-a-716517/
http://www.linuxquestions.org/questi...f-file-667544/

Have you tried any of the solutions presented on those threads?
 
1 members found this post helpful.
Old 05-11-2011, 02:20 AM   #3
kathirvel
Member
 
Registered: Jan 2011
Location: Bangalore
Distribution: RHEL,OEL
Posts: 60

Original Poster
Rep: Reputation: 0
Thank you very much,


your post was very helpful for me....

now I have another doubt ....clarify me......how to set passwd users who added into ldap database.......how to login with that username in client systems.......
 
0 members found this post helpful.
Old 05-11-2011, 10:58 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,681

Rep: Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971
Quote:
Originally Posted by kathirvel View Post
Thank you very much,
your post was very helpful for me....

now I have another doubt ....clarify me......how to set passwd users who added into ldap database.......how to login with that username in client systems.......
The words "doubt" and "question" mean different things.

Again, have you tried to look any of this up?

Setting a password:
http://linux.die.net/man/1/ldappasswd

And "client systems" is too vague. What KIND of client? Windows? Mac? Linux? Solaris? What???? Each one will have different ways to connect to and use LDAP. Google can point you to them.
 
Old 05-16-2011, 01:15 AM   #5
kathirvel
Member
 
Registered: Jan 2011
Location: Bangalore
Distribution: RHEL,OEL
Posts: 60

Original Poster
Rep: Reputation: 0
My clients both Linux and Windows

---------- Post added 05-16-11 at 11:46 AM ----------

I tried in linux.....It's giving error cannot change that user home directory....permission denied.
 
Old 05-16-2011, 09:48 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,681

Rep: Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971
Quote:
Originally Posted by kathirvel View Post
My clients both Linux and Windows

I tried in linux.....It's giving error cannot change that user home directory....permission denied.
Ok...so did you check the permissions on the users home directory??
 
Old 05-18-2011, 12:01 AM   #7
kathirvel
Member
 
Registered: Jan 2011
Location: Bangalore
Distribution: RHEL,OEL
Posts: 60

Original Poster
Rep: Reputation: 0
su - yal2361
Password:
su: warning: cannot change directory to /home/yal2361: No such file or directory
-bash-3.2$

The error gives whenever i try to login in client machine.


should i need to create home directory for that user in client machine........Is there any way to solve this......please suggest me...



Thank you very mauch
 
Old 05-18-2011, 09:26 AM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,681

Rep: Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971Reputation: 7971
Quote:
Originally Posted by kathirvel View Post
su - yal2361
Password:
su: warning: cannot change directory to /home/yal2361: No such file or directory
-bash-3.2$

The error gives whenever i try to login in client machine.
should i need to create home directory for that user in client machine........Is there any way to solve this......please suggest me...
Thank you very mauch
I did "suggest you". Check the permissions on the specified home directory. Obviously if it doesn't exist, it needs to be created.
 
  


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
[SOLVED] openldap client fails to connect ldap server 'ldap_bind: Can't contact LDAP server' JALITE Linux - Server 12 09-30-2010 08:17 AM
LDAP configuration error, can't connect to LDAP server (-1) rdanielz Linux - Networking 3 06-01-2010 09:15 AM
how to setup open ldap server and solaris 10 as ldap client maheshlad Linux - Software 1 10-10-2009 12:55 AM
Ubuntu Hardy (php-ldap):Can't contact LDAP server eantoranz Programming 7 12-02-2008 06:40 PM
authenticating through one ldap server that uses other ldap servers & active director dreamm Linux - Server 1 02-21-2007 08:22 AM

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

All times are GMT -5. The time now is 12:09 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