| Securing and Optimizing Linux: RedHat Edition -A Hands on Guide | ||
|---|---|---|
| Prev | Chapter 31. Software -Server/File Sharing-Network | Next | 
Configure your /etc/lmhosts file. The lmhosts file is the Samba Net BIOS name to IP address mapping file. It is very similar to the /etc/hosts file format, except that the hostname component must correspond to the Net BIOS naming format.
Create the lmhosts file, touch /etc/lmhosts and add your client hosts:
| 
        # Sample Samba lmhosts file.
        #
        127.0.0.1	localhost
        192.168.1.1	deep
        192.168.1.4	win
       | 
Configure your /etc/pam.d/samba file to use pam authentication by creating the samba file, touch /etc/pam.d/samba and add the following lines:
| 
        Auth	required        /lib/security/pam_pwdb.so nullok shadow
        Account	required        /lib/security/pam_pwdb.so
       | 
Configure your /etc/logrotate.d/samba file to rotate each week your log files automatically.
Create the samba file, touch /etc/logrotate.d/samba and add the following lines:
| 
            /var/log/samba/log.nmb {
            notifempty
            missingok
            postrotate
            /usr/bin/killall -HUP nmbd
            endrotate
            }
            /var/log/samba/log.smb {
            notifempty
            missingok
            postrotate
            /usr/bin/killall -HUP smbd
            endrotate
            }
           |