Sharing files from linux to windows and windows to linux using samba server in centos 5&6
#yum install samba
#yum install samba* --skip-broken
#yum restart samba
#chkconfig smb on
disable iptables (service iptables stop )
#service iptables stop
disable selinux (vi /etc/selinux/config enter selinux-disabled)
#vim /etc/selinux/config
enter selinux=disabled
(check selinux #getenforce)
#getenforce
open samba configuration file
vim /etc/samba/smb.conf
configure the server..
#vi /etc/samba/smb.conf
copy last 8 lines and paste under change as follows
[linux]
comment=<any data>
path=/exam(directory to be shared)
valid users=sam john
writable= yes
printable= no
hosts allow= 192.168.0.(allowable network)
here we are sharing /exam directory to sam and john they can read write /exam from any of 192.168.0. network system by using a share name linux
Note: we have to provide samba password for both users
#smbpasswd -a <username>
samba passwords will store under /etc/samba/smbpasswd
To check syntax of configuration file:
#testparm
#service smb restart
#mkdir /exam
#chmod 777 /exam
(here we have to set selinux context )
#chcon -t samba_share_t /exam
#setsebool -P allow_smbd_anon_write=1
############### END ##################
#yum install samba
#yum install samba* --skip-broken
#yum restart samba
#chkconfig smb on
disable iptables (service iptables stop )
#service iptables stop
disable selinux (vi /etc/selinux/config enter selinux-disabled)
#vim /etc/selinux/config
enter selinux=disabled
(check selinux #getenforce)
#getenforce
open samba configuration file
vim /etc/samba/smb.conf
configure the server..
#vi /etc/samba/smb.conf
copy last 8 lines and paste under change as follows
[linux]
comment=<any data>
path=/exam(directory to be shared)
valid users=sam john
writable= yes
printable= no
hosts allow= 192.168.0.(allowable network)
here we are sharing /exam directory to sam and john they can read write /exam from any of 192.168.0. network system by using a share name linux
Note: we have to provide samba password for both users
#smbpasswd -a <username>
samba passwords will store under /etc/samba/smbpasswd
To check syntax of configuration file:
#testparm
#service smb restart
#mkdir /exam
#chmod 777 /exam
(here we have to set selinux context )
#chcon -t samba_share_t /exam
#setsebool -P allow_smbd_anon_write=1
############### END ##################
No comments:
Post a Comment