Welcome to


Rohit Mehta : A Linux Follower

bangalore, Karnataka, India
hi! i m a person who is chill all time. Since jan 2008 i am working for Novell software. The word Impossible does not exist in my dictionary because Impossible says i m possible...hey guys have fun with linux...it begins but has no end......

Tuesday, November 17, 2009

How To configure a samba share on redhat/linux

logo-sambaSometimes your network may consists of Windows and Linux system.Samba server is the viable solution for file and printer sharing between linux and windows machines. Samba allows files and printers to be shared by all the systems in a network.
For networks having only Linux system we should go forNFS server.On how to configure NFS share read this
Samba server uses the SMB protocol for sharing files and printers across the network.

For configuration for samba server we need to install samba rpm packages.
For installing package:
# rpm -ivh samba
If your system supports yum installation use:
# yum –y install samba
If your system does not support yum installation you can configure yum server for your network. For
The default configuration file for samba is /etc/samba/smb.conf which allows users to view their home directories as a Samba share. It also shares all printers configured for the system as Samba shared printers.
If you change this configuration file, the changes do not take effect until you restart the Samba daemon with the following command .
# services smb restart.
To specify the Windows workgroup , edit the following lines in your smb.conf file:
If you want to restrict users to access samba share only form your domain then
In section1:
host allow = your domain ip-address
To create a samba share which can be accessed on windows.Go to the last section of the configuration file for samba and add the following lines
comment = Insert a comment here
path = /home/share/
valid users = tfox carole
public = no
writable = yes
printable = no
You then need to add samba password for the valid users which will access the samba share on the windows machine
#smbpasswd –a username
#service smb restart
To enable service start after the reboot:
#chkconfig smb on
Samba also provides you with a utility called testparm for checking its default configuration file.
# testparm
The above command will show you all the shared folders and printers.
One can also login into the samba share on linux machine with the following command.
#smbclient //ip-address/share-name –U username
Enter the password prompted for and access the samba share.

No comments:

Which Linux distribution has ease of use?