Hello All,
I am new to LDAP. I did the following for installing openldap.
1. Source compiled Openldap (version 2.4.23). Also installed OpenSSL 1-1.0, BerkeleyDB 4.8.30 on CentOS-5x system (IP: 192.168.1.117).
2. My /usr/local/etc/openldap/slapd.conf file is as below;
*************************************
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include /usr/local/etc/openldap/schema/core.schema
include /usr/local/etc/openldap/schema/cosine.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema
include /usr/local/etc/openldap/schema/nis.schema
# Define global ACLs to disable default read access.
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org
pidfile /usr/local/var/run/slapd.pid
argsfile /usr/local/var/run/slapd.args
# Load dynamic backend modules:
# modulepath /usr/local/libexec/openldap
# moduleload back_bdb.la
# moduleload back_hdb.la
# moduleload back_ldap.la
# Sample security restrictions
# Require integrity protection (prevent hijacking)
# Require 112-bit (3DES or better) encryption for updates
# Require 63-bit encryption for simple bind
# security ssf=1 update_ssf=112 simple_bind=64
# Sample access control policy:
# Root DSE: allow anyone to read it
# Subschema (sub)entry DSE: allow anyone to read it
# Other DSEs:
# Allow self write access
# Allow authenticated users read access
# Allow anonymous users to authenticate
# Directives needed to implement policy:
# access to dn.base="" by * read
# access to dn.base="cn=Subschema" by * read
# access to *
# by self write
# by users read
# by anonymous auth
#
# if no access controls are present, the default policy
# allows anyone and everyone to read anything but restricts
# updates to rootdn. (e.g., "access to * by * read")
#
# rootdn can always read and write EVERYTHING!
################################################## #####################
# BDB database definitions
################################################## #####################
database bdb
suffix "dc=example,dc=local"
rootdn "cn=admin,dc=example,dc=local"
rootpw {SSHA}xH7yfD6Quuob9efeKSx99unyOWJAIXP7
directory /usr/local/var/openldap-data
# Cleartext passwords, especially for the rootdn, should
# be avoid. See slappasswd( and slapd.conf(5) for details.
# Use of strong authentication encouraged.
# rootpw secret
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
# directory /usr/local/var/openldap-data
# Indices to maintain
index objectClass eq
*********************************************
3. created test.ldif
*********************************************
dn: ou=people,dc=example,dc=local
objectClass: top
objectClass: organizationalUnit
ou: people
dn: uid=infra,ou=people,dc=example,dc=local
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: infra
sn: test
givenName: infra
cn: infra test
displayName: infrat
uidNumber: 10001
gidNumber: 10000
userPassword: infra4now
gecos: test infra
loginShell: /bin/bash
homeDirectory: /home/infra
shadowExpire: -1
shadowFlag: 0
shadowWarning: 7
shadowMin: 8
shadowMax: 99999
shadowLastChange: 10877
mail: xxxxxxxxxx
postalCode: 700091
l: Kolkata
o: myorg
mobile: +91 xxxxxxxxxx
homePhone: +91 xx xx xx xx
telephoneNumber: xxxx
title: engineer
postalAddress: Salt lake
initials: KL
********************************************
4. Inserted the above test.ldif record to the ldap db (add output also pasted below);
# ldapadd -x -D "cn=admin,dc=example,dc=local" -W -f test.ldif
Enter LDAP Password:
adding new entry "ou=people,dc=example,dc=local"
adding new entry "uid=infra,ou=people,dc=example,dc=local"
5. Configured a client system (Fedora-13, IP: 192.168.1.105) and tested the
following;
$ getent passwd | grep infra
infra:10001:10000:test infra:/home/infra:/bin/bash
************************************************** *
Now, the problem I am facing is that on the client system I am unable to do ssh to infra user or can't login through the gui (gnome) using the "infra" user credentials which is basically ldap user, it says authentication failure.
$ ssh infra@192.168.1.105
infra@192.168.1.105's password:
Permission denied, please try again.
infra@192.168.1.105's password:
Permission denied, please try again.
infra@192.168.1.105's password:
Permission denied (publickey,gssapi-with-mic,password).
Could anyone please help me to sort out this
.
Regards,
-tuxb