SAMBA的安装
安装环境:cendos7.5
1:安装应用
yum -y install samba samba-client
2:创建共有文件夹
mkdir /home/R
mkdir /home/S
mkdir /home/N
mkdir /home/J
3:给共有文件夹设置权限
sudo chmod 777 /home/R
sudo chmod 777 /home/S
sudo chmod 777 /home/N
sudo chmod 777 /home/J
4:将配置文件备份一下
cp smb.conf smp.conf~bak
5:修改配置文件
[root@localhost samba]# vi smb.conf
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.
[global]
workgroup = SAMBA
security = user
passdb backend = tdbsam
map to guest = Bad User
printing = cups
printcap name = cups
load printers = yes
cups options = raw
hosts allow =10.167
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
writable = yes
path = /home/J
read only = No
inherit acls = Yes
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @printadmin root
force group = @printadmin
create mask = 0664
directory mask = 0775
[J]
path = /home/J
writable = yes
guest ok = yes
guest only = yes
create mode = 0777
directory mode = 0777
[N]
path = /home/N
writable = yes
guest ok = yes
guest only = yes
create mode = 0777
directory mode = 0777
[S]
path = /home/S
writable = yes
guest ok = yes
guest only = yes
create mode = 0777
directory mode = 0777
[R]
path = /home/R
writable = yes
guest ok = yes
guest only = yes
create mode = 0777
directory mode = 0777
6:重启服务
systemctl start smb nmb