LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   LDAP server (https://www.linuxquestions.org/questions/linux-server-73/ldap-server-879628/)

kathirvel 05-09-2011 06:38 AM

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

TB0ne 05-09-2011 09:54 AM

Quote:

Originally Posted by kathirvel (Post 4350836)
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?

kathirvel 05-11-2011 02:20 AM

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.......

TB0ne 05-11-2011 10:58 AM

Quote:

Originally Posted by kathirvel (Post 4352854)
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.

kathirvel 05-16-2011 01:15 AM

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.

TB0ne 05-16-2011 09:48 AM

Quote:

Originally Posted by kathirvel (Post 4357516)
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??

kathirvel 05-18-2011 12:01 AM

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

TB0ne 05-18-2011 09:26 AM

Quote:

Originally Posted by kathirvel (Post 4359530)
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.


All times are GMT -5. The time now is 12:31 AM.