Samba

From Jonathan Gardner's Tech Wiki
Jump to: navigation, search

What is it?

Samba allows you to setup windows shares on Linux.

Downloading

Samba is very popular software. Your distribution should have it.

What Workgroup Should I Use?

If you're setting up your home network, you could go with the default 'WORKGROUP'.

Check your windows box by right-clicking on "Computer" (from the start menu or elsewhere) and clicking on "Properties". The workgroup it is using should be listed. Changing it requires a reboot.

Configuring a Linux Server

  1. Install Software
  2. Configure SELinux
  3. Open up ports
  4. Configure SMB
  5. Start smb
  6. Start nmb

Fedora 17

Install Software

# yum -y install samba

Configure SELinux

These instructions can be found in /etc/samba/smb.conf.

# setsebool -P samba_enable_home_dirs on

Open Up Ports

The following ports need to be open. The graphical program system-config-firewall sets these all when you check off "samba". Be sure to apply the changes you make.

  • UDP ports 137, 138
  • TCP ports 139, 445

See iptables for notes on how to do this right.

Configure

To configure, edit the /etc/samba/smb.conf.

Likely, the only change you need to make is to set the workgroup. You also want to set the netbios name.

Start smb

# service smb start
# chkconfig smb on

Start nmb

# service nmb start
# chkconfig nmb on

FAQ

My share isn't showing up.
Did you start nmb? Did you set netbios name in smb.conf?

See Also