在Linux上配置SMB服务

  • 安装smb服务:
    1
    sudo yum install smb
    
  • 修改/etc/samba/smb.conf:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[global]

workgroup = WORKGROUP
server string = Samba Server Version %v

security = user
passdb backend = tdbsam

[aqui]

path = /home/aqui
valid users = aqui
guest ok = no
writable = no
browsable = yes

中括号里的aqui是盘符

  • 设置开机自启和重启服务
    1
    2
    sudo systemctl enable smb
    sudo systemctl restart smb