Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » SMS User Support

Post new topic   Reply to topic
Samba and OpenLDAP
View previous topic :: View next topic  
Author Message
Cheikh
Member


Joined: 11 Jun 2011
Posts: 25

PostPosted: Thu Oct 06, 2011 5:39 am    Post subject: Samba and OpenLDAP Reply with quote

I am trying to setup Samba to work with OpenLDAP, but so far no luck. Samba is working as a standalone PDC and LDAP is working also, but I am having problem integrating the two together. This is running SMS 1.6.1. this is so far the LDAP related configuration I have added to smb.conf
# LDAP Related Parameters:
ldap admin dn = "cn=Admin,dc=domain,dc=com"
ldap ssl = No
passdb backend = ldapsam:ldap://172.0.0.1/
ldap delete dn = no
ldap user suffix = ou=People
ldap group suffix = ou=Group
ldap machine suffix = ou=People
ldap passwd sync = yes
ldap suffix = dc=domain,dc=com.

I have also changed my /etc/nsswitch.conf to
passwd: compat ldap
group: compat ldap

This is what I am seeing in the samba log:
rpc_server/netlogon/srv_netlog_nt.c:954(_netr_ServerAuthenticate3)
_netr_ServerAuthenticate3: failed to get machine password for account WIN7-PROF$: NT_STATUS_NONE_MAPPED.

If I remove those ldap entries in smb.conf I can login with no problem.

Any help or pointers to get this to work is greatly appreciated in advance.
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Thu Oct 06, 2011 11:16 am    Post subject: Reply with quote

cheikh wrote:
passdb backend = ldapsam:ldap://172.0.0.1/

I suppose that was a typo?

Assuming default SMS ldap setup you need...

Code:
ldap admin dn = "cn=Manager,dc=sms,dc=org"
ldap ssl = No
passdb backend = ldapsam:ldap://127.0.0.1/
ldap delete dn = no
ldap user suffix = o=virtualmail,ou=virtualusers,dc=sms,dc=org
ldap passwd sync = yes
ldap suffix = dc=sms,dc=org
domain logons =yes


You need to add ldap password to secrets.db with
Code:
smbpasswd -w toor


You may need to add in /etc/openldap/slapd.conf (depending on your schema)
Code:
include       /etc/openldap/schema/samba.schema

the samba.schema is available at
/usr/doc/samba-*/examples/LDAP/

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
Cheikh
Member


Joined: 11 Jun 2011
Posts: 25

PostPosted: Fri Oct 07, 2011 1:55 am    Post subject: Reply with quote

passwd backend = ldapsam:ldap://127.0.0.1/

Yes it was a typo and you code made the same typo as well if you dont mind editing it for future references. I worked on this for hours I cant believe that was it, and did not catch it with testparm. I will continue to implement small changes and test. Big Kudo to you and thank you Very Happy I am a very happy SMS user.
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Fri Oct 07, 2011 7:31 am    Post subject: Reply with quote

I'm glad it worked for you...
I'll implement smbldap-tools in SMS though for easier setup.
I have packages ready and will upload them later today with other updates.

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    SMS Forum Index » SMS User Support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional