Tuesday, January 10, 2012

Samba with LDAP on Ubuntu 10.04 LTS

Windows Integration

The bbsamba package enables Windows clients to authenticate against the LDAP server we set up earlier.

The source code for the package is available here.

$ sudo apt-get install bbsamba

You'll be asked a series of questions about the layout of the samba files and shares:

path to netlogon scripts { /var/lib/samba/netlogon }: 
samba administrator email { sysadmin@lab.lan }: 
samba domain { LAB }: 
path to common samba shares { /opt/smb }: 
base distinguished name (dn) { dc=lab,dc=lan }: 
ldap uri for authentication { ldap:// }: 
netbios name { stemsrv01 }: 
machine relative distinguished name (rdn) { ou=Machines }: 
user relative distinguished name (rdn) { ou=Users }: 
ldap admin distinguished name (dn) { cn=djadmin,dc=lab,dc=lan }: 
parent folder for home folders { /home }: 
group relative distinguished name (rdn) { ou=Groups }: 
Please enter ldap root password:

The script will then attempt to create an administrator account for your Windows domain:

Creating the 'administrator' account for Samba. Please enter a password.
New SMB password:
Retype new SMB password:

You can verify that everything as worked by checking the administrator account:

$ groups administrator
administrator : domainusers domainadmins domainguests domainmachines

Creating New Users

At this point, you should create your new users with

$ smbpasswd -a {newuser}

No comments: