1.安装samba等相关服务
sudo apt install samba smbclient cifs-utils
2.配置组及用户
1)建立smb访问目录
sudo mkdir /mnt/scan
2)建组
sudo groupadd smbscan
3)建立用户
sudo useradd -M -s /sbin/nologin scanner
4)设置群组
sudo usermod -aG smbscan scanner
5)设置SMB用户密码
sudo smbpasswd -a scanner
6)启用SMB帐号
sudo smbpasswd -e scanner
3.配置目录
设置目录权限
sudo chgrp -R smbscan /mnt/scan
sudo chmod 2770 /mnt/scan
4.配置SMB
[global]
...
min protocol = NT1
...
[micamera]
comment = scan
force create mode = 0770
force directory mode = 0770
inherit permissions = yes
path = /mnt/scan
writable = yes
guest ok = no
valid users = scanner
5.测试是否可用
sudo testparm
6.重启服务,让配置生效
sudo systemctl restart nmbd
7.配置防火墙
sudo ufw allow Samba
标签:11,配置,scanner,scan,sudo,mnt,SMB,Debian From: https://www.cnblogs.com/merrynuts/p/18434069