header01
header02 Products Services Support Contact
header01

File sharing

What is Samba?

Samba is a collection of software that implements the Server Message Block (SMB) protocol for UNIX systems. This protocol is sometimes referred to as the Common Internet File System (CIFS). Samba also implements the NetBIOS protocol, which allows it to share files with other operating systems, like Windows.

A Linux computer running SMB and NMB can act as a fileserver for other clients. Windows machines can connect to the server by simply mapping a drive in the file manager. By providing a tape backup machine on the Linux computer, you can have a fully-functional network file server.


How to configure samba

Before attempting to run Samba, make sure you have the proper ports opened in your firewall.

You can install Samba using yum:

$ yum install samba

which should install the 4 rpm packages that are part of Samba: samba, samba-common, samba-client, and system-config-samba.

There are two ways to configure Samba

  • edit the config file directly

    The Samba configuration file is usually located in /etc/samba/smb.conf. There are examples contained in the config file for sharing files and printers. IGO does not recommend that inexperienced users edit the config file.

  • use the configuration GUI

    Point to Applications->System Settings->Server Settings->Samba and provide the root password if prompted. You can add a directory to be shared by clicking 'Add Share'. Click Preferences->Server Settings to change the workgroup name.


How to share files with Windows Clients

Before setting up the Samba Share, you need to make some decisions about which directories you'll be sharing, and to whom you'll be giving access. For example, if you want to share a particular directory with a bunch of people, it's probably best to create a directory /home/public, allow read/write access to user nobody, and choose Allow access to everyone when setting up the share. However, to allow one user to access their own directory, it's best to add the user to the Linux server (don't forget to use the same username they log into their Windows machine with), then, when setting up the Samba share, allow access to the directory to just that one user. You can find more information from the Samba Website.

Click on Applications->System Settings->Server Settings->Samba. Click Preferences->Server Settings. On the Basic tab, make sure the Workgroup value is the same as your Windows Workgroup. Click the Security tab. Choose Share from the Authentication Mode pull-down. Click the OK button.

Now click Preferences->Samba users. If the user you want to allow access to is listed, click OK. Otherwise, click Add User. From the Unix Username pull-down, choose the username of the person to allow access to (if they have a login account). If they don't, choose nobody. Provide the user's Windows Username, which should correspond to the username they use when logging onto their Windows computer. Then provide a password, and enter it again to confirm. Click OK.

Click the Add Share button. Type the directory you want to share. If you can't remember it, click Browse and choose the directory, clicking OK when done. Type the share name (and remember it for later use). If desired, you can also provide a brief description as well. To allow users to write to the directory, check the Writable box. Do the same to make it visible. Click the Access tab. To allow access to only specific users, check them. Otherwise, choose the Allow access to everyone radio button. Click OK.

On your Windows machine, open Windows Explorer and map a drive to the new share you created. The share name should look something like:

\\hostname\sharename

where 'hostname' is the name or IP address of the Linux server and 'sharename' is the share name you entered (and remembered) when setting up the share.


Linux News courtesy of /.

What's the Damage? Measuring fsck Under XFS and Ext4 On Big Storage
2012-02-03

Linux Game Publishing CEO Resigns
2012-02-01

Greg KH Leaves SUSE For Linux Foundation
2012-02-01

Why Linux Vendors Need To Sell More Than Linux
2012-01-31

New Spark Tablet To Come Loaded With KDE's Active Plasma Interface
2012-01-29

Exploits Emerge For Linux Privilege Escalation Flaw
2012-01-25

KDE 4.8 Released
2012-01-25