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

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 = \\server\profiles\%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

Related Entries

7 Responses for “Tutorial : Samba PDC + OpenLDAP on openSUSE 11.1 – Part 1”

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

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

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

  4. [...] 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 [...]

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

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

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

Leave a Reply

About Vavai

Masim Vavai Sugianto Masim Vavai Sugianto, Indonesian, male, 32 years old, born and live in Bekasi-West Java, a small town near Jakarta – main city of Indonesia – since 17 May 1976. Founder of Indonesian openSUSE and Zimbra Community, an adventure, travelling and book lover.



I live in a tropical country, Indonesia that only has two seasons, dry season and rainy season. I love the dry season with bright sunshine and rare rain…There is a joke about the seasons in Indonesia. Indonesia is known as a country with so many season, ie : durian season, mango season, married season and much more...



ContactI'm currently working as an IT support for a small company based on Jakarta. My career has led me to specialize in Sysadmin, networking and software implementation with current focus on Linux and open source area. I have experience on MRP, ERP, Gemba Kaizen, Just in Time, Six Sigma and TQC/TQM. Please use my contact page if you wish to contact me.
Log in - BlogNews Theme by Gabfire themes