Get a Free iPhone 4 from Xpango - click here

Friday, November 26, 2010

How to install Samba on linux with Screenshots

Samba allows linux computers to share files and printers across a network connection. By using its SMB protocol, your linux box can appear in Windows Network Neighborhood or My Network Places just like any other windows machine. You can share files this way, as well as printers. By using samba on my home network, for example, my Windows machines have access to a printer directly hooked up to my Linux box, and my Linux box has access to a printer directly hooked up to one of my Windows machines. In addition, everyone can access everyone else's shared files. You can see how samba can be very useful if you have a network of both Windows as well as Linux machines. 
Samba configurations are slightly different depending on the distribution you're using.This article explain steps on fedora.
  1. Install Samba
$sudo yum install samba samba-client system-config-samba
           enter your root password.

2. Adding Users.
You will need to ensure that people also have a login to the SAMBA server to do their work. Logins should be provided on an as needed basis. Obviously, in most cases the users accessing the SAMBA server will be a subset of the total users on the Windows business network.
Create user logins with the Gnome User Manager tool in Fedora. You can find this from the main menu by choosing System Settings, then Users & Groups. The command for this is: system-config-users.
                          Goto System->Administration->samba

                           Under the Preference menu item choose Samba Users

In this window you must Add at least one user who will have access to the SAMBA Server. Notice that only user accounts you created above should be added to this listing.

3. Configure Sharing
You can configure samba using /etc/samba.conf file.
We will use GUI tool installed by package “system-config-samba”.
                                   Goto System->administration->samba
                                   Goto preference->server setting


Enter Workgroup name exactly the same as in Windows OS.
In this case its ‘workgroup”. Your situation may be different.

Under this same window, click on the Security tab. It comes by default with the appropriate settings for a basic SAMBA Server. The Authentication mode should be User. You would need to change this only if you plan to allow logins based on the Microsoft ADS.



Under the SAMBA Server Configuration window, you must create at least one SAMBA share directory.
                                Press the " +" button and then the Browse button




Now choose a folder you wish to make available to SAMBA users. Be careful, some folders have permissions settings that do not allow sharing. Now be sure to select the Read/Write option to allow peoplefull access.Don't press OK yet!
In the same window, select the second tab labeled Access. From here choose the first option labeled Only allow access to specific users and select the users you wish to give access to this specific SAMBA shared folder. Press OK when finished.



4. Start Samba Server
SMB daemon and other core services are usually NOT started by default. You will need to change this so that your SMB daemon is now started.Using the GUI from the main menu, go to System Settings, then Server Settings, then choose Services. You can also get to this using the command: system-config-services.


Select SMB and press start.Save the configuration and exit.
Also make sure your firewall settings is configured to allow inbound request for Samba server.Goto to firewall settings and choose samba as trusted service.

Before moving towards windows note the IP address of your network .
Issue the following command :
$ ifconfig
It will show you the details of your networks from LAN,WLAN etc

5. Access Samba server from windows
In windows, start->run
Type the IP address of your linux system hosting the samba server.

eg: \\192.154.54.1

Will ask you for samba username and password.
You can now access shared folders in windows.

No comments:

Post a Comment