Click

What is Samba and when do you need it?

To make a long story short: The Samba project was started in 1992 by Andrew Tridgell. Samba is a set of tools to share files and printers with computers running Microsoft Windows. It implements the SMB network protocol, which is the heart of Windows networking.

Samba can be used to:

  • Act as a server for Windows (or Samba) clients: share folders and printers, including PDF pseudo-printers so all the computers in your network may write PDF files
  • Act as a domain controller in a Windows network (authenticating users, etc.)
  • Do some more complex things, such as using a Windows domain controller to authenticate the users of a Linux/UNIX machine

Samba is freely available under the GNU General Public License. More information about Samba can be found at http://www.samba.org.

Back to top

What to install

The samba package is a meta-package intended to be installed on servers. Clients do not need this meta-package. It is not necessary for clients to do any of the following:

  • Access shared folders, drives and printers on a Windows computer (that is, act as a client with Windows servers). To do this, you only need the smbfs plugin. See MountWindowsSharesPermanently for more information.

  • Have your Windows computer use (via a network) a printer that is attached to a Linux computer. CUPS can be configured to make the printer accessible to the network.
  • Share directories between two Linux computers. You can use NFS or setup an SSH server on one computer and access it from other computers using an scp or sftp client, or Places > Connect to... > SSH in Ubuntu. See https://help.ubuntu.com/community/SSHHowto

Server

If you wish your computer to act as a Samba server (act as a file or printer server) then install the samba package (see InstallingSoftware for details):

sudo aptitude install samba

Client

The samba package is not needed on clients. Install smbfs instead (see InstallingSoftware for details):

sudo aptitude install smbfs

If you want to connect to a Samba server (Windows server or an Ubuntu server running Samba) you have two options, you can use the smbclient command or you can directly mount the samba file system via smbfs.

Command line

Ubuntu will connect to a Samba server out of the box via smbclient. This is a similar to a FTP connection. Once connected, you can use commands such as ls, cd , put, and get.

smbfs

This package allows clients to mount Samba file shares, allowing them to act as local disks. Most people will prefer this method.

Back to top

Server Configuration

Ubuntu 8.04 And Later

For Ubuntu 8.04 (Hardy) and later, shared folders are created directly from the folder. Browse to the location of the folder you would like to share, right-click the folder, and choose Sharing Options. Click the Share this folder check box, and click Install Services. Enter your password, and the Samba server packages will be downloaded and installed.

Ubuntu 7.10 And Ubuntu 7.04

On Ubuntu 7.04 (Feisty) and Ubuntu 7.10 (Gutsy), open the Shared Folders configuration from System -> Administration -> Shared Folders

Ubuntu 6.10 And Earlier

Start the network configuration from System -> Administration -> Network

PicNetworkSettings.png

You will need the General tab, in the middle.

Fill in your settings:

Host Settings

Hostname:       
Domain name:

Windows Networking

  • Check Enable Windows networking

Description:       
Domain/Workgroup:

If you want, also check WINS server and enter the name or IP address of your WINS server. If you do not know what to put in any field, ask your network administrator. Typical settings for the workgroup field are "MSHOME" or "WORKGROUP".

The important settings here are your hostname, which should be filled in already, and the domain/workgroup. Press OK on both windows and the first part of cooperating with Windows machines is done.

You may also edit the file /etc/samba/smb.conf manually, and then use /etc/init.d/samba restart to restart the Samba service. You must restart Samba every time you manually change /etc/samba/smb.conf.

Note: It is possible to not include a "Windows Networking section and continue.

What is SIP trunking

What is SIP trunking..  (Session Initiation Protocol trunking) SIP trunking is a service that a communication provider offers. it uses the S...