SMB_new
yum install samba samba-client samba-common vim -y
mv /etc/samba/smb.conf /etc/samba/smb.conf.bak
vim /etc/samba/smb.conf
------------------------------------------
[global]
workgroup = WORKGROUP
server string = Media Server
security = user
map to guest = Bad Password
log file = /var/log/samba/%m.log
max log size = 50
hosts allow = 192.168.1.131 192.168.1.135
dns proxy = no
[storage]
path = /media/storage
public = yes
only guest = yes
writable = yes
---------------------------------------------
mkdir -p /media/storage
systemctl enable smb.service
systemctl enable nmb.service
systemctl restart smb.service
systemctl restart nmb.service
firewall-cmd --permanent --zone=public --add-service=samba
firewall-cmd --reload
# chmod -R 0755 /media/storage/
# chown -R nobody:nobody /media/storage/
# chcon -t samba_share_t /media/storage/
smbclient //192.168.1.130/storage (когда спросит пароль, просто нажать энтер, пароля нет)
можно закрыть доступ через порты и ip в файерволе
mv /etc/samba/smb.conf /etc/samba/smb.conf.bak
vim /etc/samba/smb.conf
------------------------------------------
[global]
workgroup = WORKGROUP
server string = Media Server
security = user
map to guest = Bad Password
log file = /var/log/samba/%m.log
max log size = 50
hosts allow = 192.168.1.131 192.168.1.135
dns proxy = no
[storage]
path = /media/storage
public = yes
only guest = yes
writable = yes
---------------------------------------------
mkdir -p /media/storage
systemctl enable smb.service
systemctl enable nmb.service
systemctl restart smb.service
systemctl restart nmb.service
firewall-cmd --permanent --zone=public --add-service=samba
firewall-cmd --reload
# chmod -R 0755 /media/storage/
# chown -R nobody:nobody /media/storage/
# chcon -t samba_share_t /media/storage/
можно закрыть доступ через порты и ip в файерволе
Comments
Post a Comment