HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   SMBLDAP-TOOLS SAMBA LDAP . Problem when filling ldap. (http://www.howtoforge.com/forums/showthread.php?t=23975)

jcdole 7th June 2008 18:51

SMBLDAP-TOOLS SAMBA LDAP . Problem when filling ldap.
 
Hello,

I am trying to modify smbldap-populate for filling people user in the people ou field, and computers in the computer ou field.

I want this organization :

people user in : "ou=people,ou=user,dc=ldap_srv,dc=net"
computer user in : "ou=computers,ou=user,dc=ldap_srv,dc=net"


Which relationships (IF ANY IS MANDATORY) is there between LDAP definitions in smb.conf

ldap suffix = dc=ldap_srv,dc=net
ldap machine suffix = ou=??????????????????????
ldap user suffix = ou=???????????????????????
ldap group suffix = ou=Groups
ldap domain suffix = ou=Domains


and LDAP definitions in smbldap.conf


# LDAP Suffix
suffix="dc=ldap_srv,dc=net"

# Domain name the Samba server is in charged.
sambaDomain="MON-DOMAINE.NWK"

# Where are stored peoples and computers
usersdn="ou=Users,${suffix}"

# Where are stored groups
groupsdn="ou=Groups,${suffix}"

# Where are stored domains
domainsdn="ou=Domains,${suffix}"

# Where are stored peoples
peoplesdn="ou=Peoples, ou=Users,${suffix}"

# Where are stored computers
computersdn="ou=Computers, ou=Users,${suffix}"

# Where to store next uidNumber and gidNumber available for new users and groups
# If not defined, entries are stored in sambaDomainName object.
sambaUnixIdPooldn="sambaDomainName=MON-DOMAINE.NET,ou=Domains,${suffix}"


When I start smbldap-populate, I get the following errors :

Use of uninitialized value in pattern match (m//) at /usr/local/sbin/smbldap-populate line 179.
Use of uninitialized value in concatenation (.) or string at /usr/local/sbin/smbldap-populate line 180.
Use of uninitialized value in concatenation (.) or string at /usr/local/sbin/smbldap-populate line 190
Use of uninitialized value in concatenation (.) or string at


Lignes 179, 180 et 190, ..... which are relatives to ou=computers et ou=peoples, ............

I have no errors about ou=users ( parent of computer and people ).
I have no errors about ou=Domains parent for sambaUnixIdPooldn.

The ldif file is generated, but there is some blank field about ou computer field and ou people field.

Thank you for any help.

sangamc 27th June 2008 01:45

Quote:

Originally Posted by jcdole (Post 129977)
Hello,

I am trying to modify smbldap-populate for filling people user in the people ou field, and computers in the computer ou field.

I want this organization :

people user in : "ou=people,ou=user,dc=ldap_srv,dc=net"
computer user in : "ou=computers,ou=user,dc=ldap_srv,dc=net"

i dont think you can put a single object into multiple ou, if it is possible you should leave it alone until you get more comfortable with ldap. try instead

computers in: "ou=computers,dc=ldap-srv,dc=net"
users in: "ou=People,dc=ldap-srv,dc=net"

Quote:

Which relationships (IF ANY IS MANDATORY) is there between LDAP definitions in smb.conf

ldap suffix = dc=ldap_srv,dc=net
ldap machine suffix = ou=??????????????????????
ldap user suffix = ou=???????????????????????
ldap group suffix = ou=Groups
ldap domain suffix = ou=Domains
they are all required for your setup to work, use
ldap user suffix = ou=Users
ldap machine suffix = ou=Computers

Quote:

and LDAP definitions in smbldap.conf
# LDAP Suffix
suffix="dc=ldap_srv,dc=net"

...

Thank you for any help.
they are all required for the setup to work. if your smb.conf is setup correctly (execute # testparm to find out) you can use /usr/share/doc/smbldap-tools-0.9.4/configure.pl to configure you smbldap_bind and smbldap.conf for you automatically. just enter the password for you ldap server when the script asks you

jcdole 15th July 2008 23:38

For now I can't do any test. I have change my PC and done a fresh install. But I ran into some other samba problem. See my today's post about port 139 wich is closed.

ryazkhan 10th August 2008 06:14

Quote:

Originally Posted by jcdole (Post 136139)
For now I can't do any test. I have change my PC and done a fresh install. But I ran into some other samba problem. See my today's post about port 139 wich is closed.

I would use phpldapadmin for this (add/remove) task. If you want to setup again follow this www.freetech.selfip.info/smbldap.php

jcdole 10th August 2008 17:09

As it seems too difficult to modify smbldap tools I did the job by hand.

Have generate the ldif file
smbldap-populate -e an_ldif_file
Have edit the ldif file to fill blank file accordingly with my ldap schema
before edit
dn: ou=Peoples,ou=Users,dc=ldap_hathor,dc=nwk
objectClass: top
objectClass: organizationalUnit
ou:
description: 5 - Container pour les Personnes
after edit
dn: ou=Peoples,ou=Users,dc=ldap_hathor,dc=nwk
objectClass: top
objectClass: organizationalUnit
ou: Peoples
description: 5 - Container pour les Personnes

and load the ldif file :

slapadd -b a_domain -v -l an_ldif_file

Thanks everybody for your time.

This thread should be closed


All times are GMT +2. The time now is 19:38.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.