samba 配置案例
案例 1
yum -y install sambavim /etc/samba/smb.conf
[smbshare]
path = /smbshare
public = yes
writeable=yes
hosts allow = 192.168.xx.
hosts deny = allyum -y install sambavim /etc/samba/smb.conf
[smbshare]
path = /smbshare
public = yes
writeable=yes
hosts allow = 192.168.xx.
hosts deny = alluseradd smb1
smbpasswd -a smb1(密码:smb123456)pdbedit -a smb1(密码:smb123456)pdbedit -Lmkdir /smbshare
chown smb1:smb1 /smbsharevim /etc/selinux/config
SELINUX=disabledfirewall-cmd --zone=public --add-service=samba --permanent
firewall-cmd --reload
systemctl restart smbyum -y install sambavim /etc/samba/smb.conf
[global]
workgroup = WORKGROUP
[webdata]
path = /data/web_data
public = yes
writable=yes
hosts allow = 192.168.1xx.33/32
hosts deny = alltestparm
useradd -s /sbin/nologin apache
smbpasswd -a apache(密码:smb123456)
pdbedit -a apache(密码:smb123456)
pdbedit -L
mkdir /data/web_data
cd /data/web_data/
setfacl -m u:apache:rwx .
getfacl /deta/web_data/setenforce 0
firewall-cmd --zone=public --add-service=samba --permanent
firewall-cmd --reload
systemctl start smbyum -y install samba
mkdir /data/web_data
mount -t cifs -o username=apache,password='123' //192.168.xx+1.xx/webdata /data/web_datayum -y install sambavim /etc/samba/smb.conf
[global]
workgroup = WORKGROUP
[webdata]
path = /data/web_data
public = yes
writable=yes
hosts allow = 192.168.xx+1.
hosts deny = all
create mask = 0770testparm
useradd apache
smbpasswd -a apache(密码:123)
pdbedit -a apache(密码:123)
pdbedit -L
mkdir /data/web_data
cd /data/web_data/
setenforce 0
firewall-cmd --zone=public --add-service=samba --permanent
firewall-cmd --reload
systemctl start smbyum -y install samba
mkdir /data/web_data
mount -t cifs -o username=apache,password='123' //192.168.xx+1.xx/webdata /data/web_data