Security Consulting
  Unix Administration     Firewall     Intrusion Detection     Network Security     Hacking     MORE     HOME    

Samba Tips

If you consider to use your UNIX Box as a Windows File Server, you might already know about Samba. Be warned up front: DON'T allow Netbios and family across your firewall!!!! (Ports 137 and 138, 139 should block!)

After having done that, you are ready to go for it. There might be some things which might stop you from using it. Here some of my experiences when I installed Samba:

  • If you are using Windows NT Service Pack 3 or higher or Windows 98 and want to access the Shares on the UNIX machine, make sure you have the following entry in the smb.conf file:
      encrypt passwords = yes
    The reason for this is that the Windows versions above only use encrypted passwords. Further you might want to set the security option for passwords as:
      security = user
    This makes sure that a client can only use a share it he presents a username and a password.
    ATTENTION: If you are using PAM, set encrypp password=no !!! The passwords which are used to authenticate a user for the shares, are not those stores in the UNIX passwd file. You need to create a seperate file. There are a couple of possibilities to do so. One of them is to use the same as in your passwd file. Therefore you do the following:
      cat /etc/passwd | sh /usr/lib/samba/scripts/mksmbpasswd.sh > /etc/smbpasswd
    After that you need to set the passwords for all the users by using the smbpasswd program.

  • On a certain share, if you want a group to use it, you can add a @ in front of the "username" and it will be used as a group name.


    CopyLeft (l) 2003 by Raffael Marty