Step 1: Install Samba Server Package
#mkdir /opt/Data
Step 3 : Change Configuration file
#vim /etc/samba/smb.conf
workgroup = WORKGROUP
hosts allow = 127. 10.0.0.
#Now add below configuration in the last of configuration file
[Data] #Change share name according to your requirement
comment = Data #Change comments according to you
path = /opt/Data #Change directory path according to your requirement
recycle:noversions = *.doc
force directory mode = 0777
force group = test
recycle:keeptree = yes
hide dot files = yes
veto files = /.deleted/ # Deleted file by user store in .deleted folder in your
#share
recycle:maxsize = 0 # 0 value means unlimited
recycle:touch = yes
vfs objects = recycle
browseable = no
writeable = yes
recycle:exclude_dir = /tmp
force create mode = 0777
recycle:exclude = *.tmp
valid users = @test # all the user from test group can access this share
create mode = 0777
recycle:versions = yes
recycle:repository = .deleted/%U # %U create every user folder who will
#delete the file and folder
directory mode = 0777 # directory will create with 777
#permission in directory
#Note : Change Share name , Share Directory Path , and valid user according to your requirement .
# Now save the file and restart services .
Step 4 : Restart services
For Centos/RHEL
#service smb restart
#chkconfig smb on
For Ubuntu
#/etc/init.d/smbd restart
Extra Activity according to requirement .
##### Samba Share configured successfully enjoy ################
#yum -y install samba
or
#apt-get install samba
Step 2: Create Directory to Share with Samba
#mkdir /opt/Data
Step 3 : Change Configuration file
#vim /etc/samba/smb.conf
# change workgroup (Windows' default)
workgroup = WORKGROUP
# uncomment and change IP address you allow
hosts allow = 127. 10.0.0.
# change change (no auth)
security = user
#Now add below configuration in the last of configuration file
[Data] #Change share name according to your requirement
comment = Data #Change comments according to you
path = /opt/Data #Change directory path according to your requirement
recycle:noversions = *.doc
force directory mode = 0777
force group = test
recycle:keeptree = yes
hide dot files = yes
veto files = /.deleted/ # Deleted file by user store in .deleted folder in your
#share
recycle:maxsize = 0 # 0 value means unlimited
recycle:touch = yes
vfs objects = recycle
browseable = no
writeable = yes
recycle:exclude_dir = /tmp
force create mode = 0777
recycle:exclude = *.tmp
valid users = @test # all the user from test group can access this share
create mode = 0777
recycle:versions = yes
recycle:repository = .deleted/%U # %U create every user folder who will
#delete the file and folder
directory mode = 0777 # directory will create with 777
#permission in directory
#Note : Change Share name , Share Directory Path , and valid user according to your requirement .
# Now save the file and restart services .
Step 4 : Restart services
For Centos/RHEL
#service smb restart
#chkconfig smb on
For Ubuntu
#/etc/init.d/smbd restart
Extra Activity according to requirement .
=>
To enable link in samba share to visible make below entry in
/etc/samba/smb.conf
[global]
follow
symlinks = yes
wide
links = yes
unix
extensions = no
=>
To Mount Samba permanent in Linux system
#mount
-t cifs -o username=user,workgroup=workgroupname,password=pass
//192.168.1.100/share /mnt/share
##### Samba Share configured successfully enjoy ################
No comments:
Post a Comment