• Home
  • Free Stuff
  • About
  • Contact

Tutorial : Samba PDC + OpenLDAP on openSUSE 11.1 – Part 1

January 4, 2010

I would notice that based on my experience, configuring Samba PDC + OpenLDAP on openSUSE 11.1 are a long journey that would bring you into headache, so you must be careful on copying the configuration and make a proper changes to meet with your environment. Please give me a comment if you found a typo or an error message while trying the tutorial.

I’m using vavai.net as domain name, server as hostname and 192.168.1.254 as server IP address.

INSTALLING BASE SYSTEM

  1. Install openSUSE with the default option. You may choose to use standard disk partition, LVM or a RAID array. Also, select your preferred interface between graphical or text mode environment
  2. Install the following pattern with YAST | Software | Software Management or Zypper : lamp_server dhcp_dns_server file_server directory_server
  3. Install following package using openSUSE Build Service : perl-Unicode-MapUTF8 perl-ldap smbldap-tools phpldapadmin

CONFIGURING SAMBA

  1. Backup old Samba configuration
    su
    cd /etc/samba/
    mv smb.conf smb.conf.old
    
  2. Create a new /etc/samba/smb.conf with your preferred editor and with root permission. Copy-paste the following configuration and make a proper changes according to your environment :
    # Primary Domain Controller smb.conf
    # Global parameters
    [global]
    unix charset = utf8
    workgroup = VAVAI
    netbios name = server
    # passdb backend =ldapsam:"ldap://server.vavai.net"  ## Leave it as is
    username map = /etc/samba/smbusers
    log level = 1
    syslog = 0
    log file = /var/log/samba/%m
    max log size = 0
    name resolve order = wins bcast hosts
    time server = Yes
    printcap name = CUPS
    add user script = /usr/sbin/smbldap-useradd -m '%u'
    delete user script = /usr/sbin/smbldap-userdel '%u'
    add group script = /usr/sbin/smbldap-groupadd -p '%g'
    delete group script = /usr/sbin/smbldap-groupdel '%g'
    add user to group script = /usr/sbin/smbldap-groupmod -m '%g' '%u'
    delete user from group script = /usr/sbin/smbldap-groupmod -x '%g' '%u'
    set primary group script = /usr/sbin/smbldap-usermod -g '%g' '%u'
    add machine script = /usr/sbin/smbldap-useradd -w '%u'
    logon script = logon.bat
    logon path = \serverprofiles%u
    logon drive = H:
    domain logons = Yes
    domain master = Yes
    wins support = Yes
    # peformance optimization all users stored in ldap
    ldapsam:trusted = yes
    ldap suffix = dc=vavai,dc=net
    ldap machine suffix = ou=Computers,ou=Users
    ldap user suffix = ou=People,ou=Users
    ldap group suffix = ou=Groups
    ldap idmap suffix = ou=Idmap
    ldap admin dn = cn=Manager,dc=vavai,dc=net
    idmap backend = ldap://127.0.0.1
    idmap uid = 10000-20000
    idmap gid = 10000-20000
    printer admin = root
    printing = cups
    
    #========================Share Definitions=========================
    
    [homes]
    comment = Home Directories
    valid users = %S
    browseable = yes
    writable = yes
    create mask = 0600
    directory mask = 0700
    
    [sysvol]
    path = /data/samba/sysvol
    read only = no
    
    [netlogon]
    comment = Network Logon Service
    path = /data/samba/sysvol/vavai.net/scripts
    writeable = yes
    browseable = yes
    read only = no
    
    [profiles]
    path = /data/samba/profiles
    writeable = yes
    browseable = no
    read only = no
    create mode = 0777
    directory mode = 0777
    
    [Documents]
    comment = share to test samba
    path = /data/documents
    writeable = yes
    browseable = yes
    read only = no
    valid users = "@Domain Users"
    
  3. Create Samba folder
    mkdir /data
    mkdir /data/samba
    mkdir /data/samba/sysvol
    mkdir /data/samba/sysvol/vavai.net
    mkdir /data/samba/sysvol/vavai.net/scripts
    mkdir /data/documents
    mkdir /data/samba/profiles
    
  4. Edit /etc/hosts so the content would like this :
    # IP-Address  FullyQualifiedHostName  ShortHostname
    #
    127.0.0.1    localhost   localhost.localdomain
    192.168.1.254    server   server.vavai.net
    
  5. Get the Samba server Local SID with the following command :
    net getlocalsid
    

    Samba will response with the SID for domain, ex : SID for domain SERVER is: S-1-2-33-4444444444-5555555555-6666666666. Write it because we will need the SID for smbldap-tools

  6. Edit /etc/samba/smb.conf and remove the mark from the following line :
    # passdb backend =ldapsam:"ldap://server.vavai.net"  ## Leave it as is
    

    so, it will looks like this :

    passdb backend =ldapsam:"ldap://server.vavai.net"
    

We will continue to the second tutorial : Samba PDC + OpenLDAP on openSUSE 11.1 – Configuring LDAP Server

OpenLDAPPDCSambaSUSE Family
Share

Server  / SUSE Family

Masim "Vavai" Sugianto
Traveller, Open Source Enthusiast & Book Lover. Works as Independent Worker & Self-Employer.

3 Comments


Tutorial : Samba PDC + OpenLDAP on openSUSE 11.1 – Part 2 | Spirit of Change
January 6, 2010 at 14:45
Reply

[…] Previous Tutorial : Tutorial : Samba PDC + OpenLDAP on openSUSE 11.1 – Part 1, Installing Base System & Configuring Samba […]



Tutorial : Samba PDC + OpenLDAP on openSUSE 11.1 – Part 3 | Spirit of Change
January 7, 2010 at 15:51
Reply

[…] Tutorial : Samba PDC + OpenLDAP on openSUSE 11.1 – Part 1, Installing Base System & Configurin… […]



Tutorial : Samba PDC + OpenLDAP on openSUSE 11.1 – Part 4 | Spirit of Change
January 9, 2010 at 23:50
Reply

[…] Tutorial : Samba PDC + OpenLDAP on openSUSE 11.1 – Part 1, Installing Base System & Configurin… […]



Novell News Summary – Part I: OpenSUSE Survey and Site Changes, Breakage | Boycott Novell
January 10, 2010 at 02:52
Reply

[…] relating to SUSE Studio or OpenSUSE 11.2 and Masim still makes a lot of OpenSUSE HOWTOs, such as this one. Here is an extensive installation guide for OpenSUSE 11.2: When I wrote and published my […]



Tutorial : Samba PDC + OpenLDAP on openSUSE 11.1 – Part 5 | Spirit of Change
January 28, 2010 at 17:17
Reply

[…] Tutorial : Samba PDC + OpenLDAP on openSUSE 11.1 – Part 1, Installing Base System & Configurin… […]



Tutorial : Samba PDC + OpenLDAP on openSUSE 11.1 – Part 6 | Spirit of Change
January 29, 2010 at 11:46
Reply

[…] Tutorial : Samba PDC + OpenLDAP on openSUSE 11.1 – Part 1, Installing Base System & Configurin… […]



Cleveland Overman
February 3, 2010 at 13:16
Reply

I have been searching online for articles like this and appreciate the tim and effort you put into helping folks like me. Thank you



Iyyappan V
December 23, 2010 at 22:02
Reply

Hi,
I have configured samba pdc with ldap as backend…. i am able to add all win clients… Now i need to set up samba bdc with ldap as backend …can u guide me for this …..For me i am able to create samba bdc but i am facing problems with ldap …..Kindly guide me on this ….please provide sum docs



Iyyappan V
December 23, 2010 at 22:02
Reply

I am using SLES 11….. i configured everything using Yast



Leave a Reply Cancel reply

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

  • Recent Posts

    • Commercial SSL Certificate Deployment on vSphere Host 6.7
    • VMware vSphere 6.7 Ebook (Indonesian)
    • Pursuing FIRE in Indonesia : Expenses and Living Cost
    • Pursuing FIRE in Indonesia : Choosing Dividend Stock
    • Intel NUC NUC817HVK Hades Canyon VR Edition
    • Financial Independence : Beginning the Journey
    • Zimbra MariaDB Error : Can’t init tc log
    • Being Tired for Daily Routine
    • Script to Add Dynamic IP to /etc/hosts
    • List of Interesting Link this Week (I)



© Copyright LetsBlog Theme Demo - Theme by ThemeGoods