>samba ldap setup

By | April 29, 2013


Below questions encountered by most of the Linux admin

Is there any options in Linux to implement windows Active Directory concept?

The answer is yes, You can implement windows AD logic on Linux servers. Suppose as a linux admin, you get the task to migrate windows Active Directory server to Linux platform. 

Windows AD is integrated implementation of ldap and kerberos for centralized authentication server and single sign on.

In my last articles, I already covered ldap installation and configuration 

After successfull installation and configuration of ldap. We need to configure samba. Below is the samba configuration file (/etc/samba/smb.conf) for running samba+ldap server

workgroup = linuxmantra
server string = host1
netbios name = host1
ldap passwd sync = yes
security = user
passdb backend = ldapsam:ldap://
ldap suffix = dc=linuxmantra,dc=com
ldap machine suffix = ou=Computers
ldap user suffix = ou=People
ldap group suffix = ou=Group
ldap admin dn= “uid=root,ou=People,dc=linuxmantra,dc=com”
domain master = yes
domain logons = yes
logon path =     
add user script = /usr/sbin/smbldap-useradd “%u”
add group script = /usr/sbin/smbldap-groupadd “%g”
add machine script = /usr/sbin/smbldap-useradd -w “%u”
delete user script = /usr/sbin/smbldap-userdel “%u”
delete group script = /usr/sbin/smbldap-groupdel “%g”
local master =  yes
os level =  254
preferred master = yes
wins support = yes

comment = Network Logon Service
path = /var/lib/samba/netlogon
guest ok = yes
writable = no
share modes = no

As you can notice in samba configuration file, there is given ldap tree structure. 

We also need to create this ldap structure, before starting samba. There are certain tools that populate ldap tree structure, so that require structure can be created without much manual intervention. Following link will help you to install smbldap-tool and populate ldap tree structure.

Share itShare on FacebookEmail this to someoneTweet about this on TwitterShare on Google+Share on LinkedInPrint this page

One thought on “>samba ldap setup

  1. Pingback: KBTECHWORLD

Leave a Reply

Your email address will not be published. Required fields are marked *

Current month ye@r day *