Debian Samba Server Setup








 

  1. Install samba
    • aptitude install smaba samba-doc smbldap-tools
      • Workgroup/Domain Name: NIG
      • Modify smb.conf to use WINS settings from DHCP?: No
    • dpkg-reconfigure samba
      • How to run Samba: daemons
      • Create password database: Yes
  2. Enable samba.schema in LDAP server
    • aptitude install samba-dodc
    • cd /usr/share/doc/samba-doc/examples/LDAP
    • gunzip samba.schema.gz
    • cp samba.schema /etc/ldap/schema/samba.schema
    • vim /etc/ldap/slapd.conf
      • include /etc/ldap/schema/samba.schema
    • /etc/init.d/slapd restart
  3. Let Samba use LDAP as backend
    • vim /etc/samba/smb.conf
      • passdb backend = ldapsam:ldap://localhost
      • ldap suffix = dc=neuroimaging,dc=org,dc=au
      • ldap machine suffix = ou=SMBMachines
      • ldap user suffix = ou=People
      • ldap group suffix = ou=Group
      • ldap admin dn = cn=admin,dc=neuroimaging,dc=org,dc=au
      • ldap delete dn = no
      • ldap ssl = start_tls
  4. Configure smbldap-tools package
    • aptitude install smbldap-tools
    • cp /usr/share/doc/smbldap-tools/examples/smbldap_bind.conf /etc/smbldap-tools/
    • gzip /usr/share/doc/smbldap-tools/examples/smbldap.conf.gz
    • cp /usr/share/doc/smbldap-tools/examples/smbldap.conf /etc/smbldap-tools/
    • vi /etc/smbldap-tools/smbldap_bind.conf
    • vi /etc/smbldap-tools/smbldap.conf
    • vi /etc/samba/smb.conf
    • Note: read /usr/share/doc/smbldap-tools/
  5. Important:
    • To change rootpw of the binddn cn=admin,dc=example,dc=org, you need
      • smbldap-passwd
      • edit /etc/smbldap-tools/smbldap_bind.conf
      • smbpasswd -w <ldap_rootpw>
See Also
  1. Samba LDAP
  2. Samba 3 LDAP



No comments:

Post a Comment