Samba Server
6:29 AM
By
Rajashekar Reddy BusiReddy
RHCE
0
comments
Samba Server
Samba is the standard Windows
interoperability suite of programs for Linux and UNIX.
Samba sets up network shares of
Linux and UNIX directories .These directories will appear to windows users as
normal folders accessible via network
UNIX users can mount the shares
directly as part of their file structure
Service profile
Package: samba
Service:smb
Deamons:nmbd ,smbd
Configuration file:/etc/samba/smb.conf
Script file:/etc/init.d/samba
Port no: 137 NetBios
Name service
138 NetBios Datagram Service
139 NetBios Session Service
Objective:To
share the files among the cross platform
Install the Packages
[root@smb~]#Yum install samba* -y
Create the resources
on Samba server i.e, files/folders and users
[root@smb~]#useradd raju
[root@smb~]#useradd koti
[root@smb~]#passwd ****
[root@smb~]#passwd ****
Create shared folder
/var/raju with full permission and some files inside
[root@smb~]#mkdir /var/raj
[root@smb~]#chmod 777 /var/raj
[root@smb~]#cd /var/raj
[root@smb~]#touch
file[1..10] #creates files i.e, file1 to file10
Edit the main
configuration
[root@smb~]#vi /etc/samba/smb.conf
#go to end of the file copy last 8
lines 8yy and press p to paste
[redhat] #shared
name
comment=this is for redhat
path=/var/raj
valid users= raju koti
public=no
writable=yes
printable=yes
host allow=192.168.0.0/24
:wq!
Check the syntax of
the configuration file
[root@smb~]#testparam
Provide a separate
samba password for the samba users to getsamba shares
[root@smb~]#smbpasswd –a raju
[root@smb~]#smbpasswd –a koti
[root@smb~]#chkconfig smb on
[root@smb~]#service smb restart
Client configuration
In linux
[root@smbclient~]#smbclient
//192.168.0.1/redhat –U raj
Password:
Smb:\>ls
Smb:\>get <name of the file
to download>
Smb:\>put <name of the file
to upload>
Smb:\>exit
In windows
Start-> Run->\\ip\shared
name
Provide samba username and
password
Leave Your Comment Below If You Like This Post
0 comments: