Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Sep 2006 21:42:11 +0800
From:      Nik <nikruzhan@gmail.com>
To:        current@freebsd.org
Subject:   ldap+samba problem on FreeBSD 5.5
Message-ID:  <60ffc71f0609030642h4bcb306eh6dab804d1dec1045@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi all,

I already can see the test id that I add from test.ldif file. But when I try
to su to that username it give me this message:

> id testuser
uid=15000(testuser) gid=15000(testgroup) groups=15000(testgroup)

> su testuser
[I have no name!@haniey /usr/local/etc/openldap]$

> finger testuser
finger: testuser: no such user

It's suppose to create one directory folder for testuser at
/usr/home/testuser but there is no folder at all. It's also giving me this
error log message upon slapd start.

slapd[1028]: nss_ldap: could not search LDAP server - Server is unavailable

FYI, I've edit the /etc/pam.d and /etc/nsswitch.conf to the need. At the
moment I haven't setup samba yet just try to manage ldap working fiest.

Here is my config's file:

## ------------------------ldap.conf

host hay.ath.cx
base dc=hay,dc=ath,dc=cx
rootbinddn cn=Manager,dc=hay,dc=ath,dc=cx

ssl no
pam_passwd md5
bind_timelimit 10
bind_policy soft
pam_filter objectclass=posixaccount
pam_login_attribute uid

scope one
pam_password exop

nss_base_passwd       ou=Users,dc=hay,dc=ath,dc=cx?one
nss_base_passwd       ou=Computers,dc=hay,dc=ath,dc=cx?one
nss_base_shadow       ou=Users,dc=hay,dc=ath,dc=cx?one
nss_base_group        ou=Groups,dc=hay,dc=ath,dc=cx?one


## ------------------------slapd.conf

include     /usr/local/etc/openldap/schema/core.schema
include     /usr/local/etc/openldap/schema/corba.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
include     /usr/local/etc/openldap/schema/misc.schema
include     /usr/local/etc/openldap/schema/openldap.schema
include     /usr/local/etc/openldap/schema/samba.schema

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

# Load dynamic backend modules:
modulepath  /usr/local/libexec/openldap
moduleload  back_bdb
#moduleload back_ldap
#moduleload back_ldbm
#moduleload back_passwd
#moduleload back_shell

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

sasl-realm              HAY.ATH.CX
sasl-host                ldap.hay.ath.cx
sasl-secprops         none

loglevel -1

database    bdb
suffix      "dc=haniey,dc=ath,dc=cx"
rootdn      "cn=Manager,dc=haniey,dc=ath,dc=cx"
rootpw      {MD5}mbb7z3WFoj0R807QFJlmDw==
directory   /var/db/openldap-data

# 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
index sambaSID              eq
index sambaPrimaryGroupSID      eq
index sambaDomainName           eq
index default               sub

schemacheck     on
lastmod         on


## ---------------------------------test.ldif

dn: dc=hay,dc=ath,dc=cx
dc: hay
objectClass: top
objectClass: domain
objectClass: domainRelatedObject
associatedDomain: haniey.ath.cx

dn: ou=Users,dc=hay,dc=ath,dc=cx
ou: Users
objectClass: top
objectClass: organizationalUnit

dn: ou=Computers,dc=hay,dc=ath,dc=cx
ou: Computers
objectClass: top
objectClass: organizationalUnit

dn: ou=Groups,dc=hay,dc=ath,dc=cx
ou: Groups
objectClass: top
objectClass: organizationalUnit

dn: uid=testuser,ou=Users,dc=hay,dc=ath,dc=cx
cn: testuser
sn: Dummy
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
uid: testuser
userpassword:
uidnumber: 15000
gidnumber: 15000
gecos: Test User Dummy
loginShell: /usr/local/bin/bash
homeDirectory: /usr/home/testuser
description: A simple test user.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?60ffc71f0609030642h4bcb306eh6dab804d1dec1045>