Tuesday, May 3, 2011

SAMBA SERVER


Samba Server -> It is basically used for sharing file and directory on windows and Linux machine. Using it you can share printers, files and directories on window machine and Linux machine.

Note -> Disabled Firewall

Note -> Before configuring the samba server first install the samba rpm package from using YUM or using rhel 5 DVD.

Using Yum -> yum -y install samba*

------------------------------------------------------------------------------
On Server Side

After installing of samba rpm, login as root and open the samba configuration file in editing mode. The configuration file is

vi /etc/samba/smb.conf

In /etc/samba/smb.conf file go to the line number 80 and edit it like that

host allow = 127. 192.168.1

Uncomment the line and leave it.


Now go to end of file and add these lines

[Test] # Here [Test] is shared filename of directory
comment # any thing you like
path=/home/linux # Here path is your shared directory
validuser=Michal # Michal is a user name through which you can access shared
directory on linux machine.
read list=Michal # Permission for reading directory for user Michal
write list=Michal # Permission for writing share director for user
Browsable=yes # Permission for browse samba share on clients end.

Save & Exit.

Now add a user as you define in /etc/samba/smb.conf configuration file. Here I use Michal

useradd michal
smbpasswd -a michal

Set user password.Remeber here I use "smbpasswd" not "passwd" to set password for Michal.Becaue samba server has its own file to save user passwd.Samba server retrieved the passwd information from smbpasswd file.

And on linux machine you have to must a user password to access shared directory using samba. Without it you can’t login.

----------------------------------------------------------------------------
Here I suggest you add user before configuring the /etc/samba/smb.conf file.
-----------------------------------------------------------------------------

*****************************************************************************

On client Side

To download file

smbclint -L //192.168.1.254 /test -U michal

mget filname -------> to download

mput filename -------> to upload

On Window Machine

Open--> run and the server ip address

\\192.168.1.254 press enter.

You can see only Share file name not the shared directory name.

***************************************************************************

Read more: http://networkupd8.blogspot.com/2010/11/samba-server-in-linux.html#ixzz1LHThMqrN

No comments:

Post a Comment