Site Navigation
What's This All About?
Linux Server Setup
   Initial LDAP Setup
   NFS Setup
   SAMBA Setup
   Additional LDAP Setup
Linux Client Setup
   LDAP Setup
   NFS Setup
Mac OS X Client Setup
   LDAP Setup
   NFS Setup
Windows 2000 Client/Domain Setup
Adding Users and Final Use


SAMBA Setup Instructions:

Now that we have our LDAP and NFS servers up and running it is time to configure and install the SAMBA server to add in windows support. Once we have finished SAMBA we will have to go back and make some changes to our LDAP server to add in SAMBA support.

  • Server Configuration
    • Install the Debian libldap2-dev,libreadline4-dev,acl-dev packages to support compiling fo the SAMBA source packages.
    • Download and then unpack the latest stable SAMBA source packages (from samba.org)
    • Next we need to configure the source packages so that when we compile them the support we need will be added. You will run a ./compile command, followed by a whole bunch of options. I will explain each of the options, then give a full command you can copy and paste to run it.
      • --prefix=/usr/local : where to install SAMBA
      • --with-ldapsam : use LDAP for database
      • --with-fhs
      • --with-readline : use readline for commandline utilities
      • --with-smbmount : build the smbmount utlitity
      • --with-automount
      • --with-syslog : build in options for syslog
      • --with-utmp : build in options for utmp logs
      • --with-msdfs
      • --with-libsmbclient : build a common smbclient library
      • --with-acl-support
      • This command gets the samba package ready to compile. You probably want to just copy and paste the line below:

        Code:

        ./configure --prefix=/usr/local --with-ldapsam --with-fhs --with-readline --with-smbmount --with-automount --with-syslog --with-utmp --with-msdfs --with-libsmbclient --with-acl-support

        Whew. Got that? That command will take a while to run while it gets everything ready to compile.

      • Next run the make command. This will compile the SAMBA sources.

      • Next run make install. This will install the programs that were compiled above. Each of these steps may take a while to finish.

      • You should now have a smb.conf file located in /etc/samba (create on if you don't). This is the file that controls samba. Make sure that it has the information you need it to have for your server/domain. You may have to manually change things like the netbios name, workgroup, and some other settings, such as the ldap server information. Read through this file carefully and make any changes as needed for your network. Here is a sample smb.conf file.

      • Once your smb.conf file is ready, run the testparm utility to verify that your smb.conf file is valid. This pointed out some missing directories in our installation.

        Code:

        testparm

        After running testparm, fix any syntax errors and create any missing directories that you may find.

      • Start the smbd and nmbd servers.

        Code:

        smbd -D
        nmbd -D

        One problem we encountered in our installation was:
        • smbd died, needed a place to put secrets.tdb. Had to create the /usr/local/etc/samba/private directory.
        • You may also have to run smbpasswd -w secret_password_here command to set up the admin account for samba. warning: this command writes your password in clear text on the screen, so make sure no one is watching, and clear your command history when done. This stores the password in plain text in your secrets.tdb file. This file is like ldap.secret. Keep file permissions tight on it, or your whole server is compromised.
      • A simple test to run to test your installation is smbclient -L smb_netbios_name

        Code:

        smbclient -L piggy

        This uses the command line utility to connect to the smb server.

      • Additionally, you could do more advanced testing, such as connect from various windows clients to verify that your setup works.

      That should be all for your SAMBA setup. Once this is finished and tested, we should be ready for the last major step of our setup, which is reconfiguring LDAP to run with SAMBA.