Samba Server Tricks

Issue:

When samba server has been set properly, windows client can only see it but cannot access!

Solution:

check if firewall is enabled. if yes, open ports:

137:udp, 138:udp, 139:tcp, 445:tcp

then the problem will be solved immediately.

Configuration:

  • OS: FC4, WindowsXP SP1
  • X: Gnome

Tricks:

  1. Check ownership of the directory to share (especially for ntfs files, only 0500 access can be set)
  2. Open Samba Server Configuration, go to Preference, then choose:
  3. Server Setting -> Security -> Authentication Mode: If sharing for anonymous Win clients, set to: SHARE
  4. Server Setting -> Security -> Guest Account: same as the directory owner
  5. Samba Users: Add the user who is also directory owner
  6. Don’t forget to restart samba by: service smb restart.
  7. In case, need authentication to access samba, attention must be paid on a bug in some windows clients that whenever the username and password is sent out, Windows client causes the password that the user types in to be IGNORED from a “connection to [linux hostname]” box. Instead Windows uses the user name and password in effect for the user’s current Windows login session. One work around is to assign the same user name/ password combination for each user on the Linux system that they use in Windows. (ref. C. Negus, p723, Setting Up a File Server, Red Hat Fedora Linux2 Bible)