我无法以 root 用户身份连接到我的 Samba 共享。不过我认为我的配置文件没有问题。但我注意到我也无法从 Samba 中删除 root 用户。对于其他用户则完全没有问题。
/etc/samba/smb.conf
[global]
# Basic Samba configuration
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
security = user
printcap name = /dev/null
load printers = no
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=524288 SO_SNDBUF=524288
server string = Samba Server %v
map to guest = bad user
dns proxy = no
wide links = yes
follow symlinks = yes
unix extensions = no
acl allow execute always = yes
log file = /var/log/samba/%m.log
max log size = 1000
# Special configuration for Apple's Time Machine
fruit:model = MacPro
fruit:advertise_fullsync = true
fruit:aapl = yes
## Definde your shares here
[root]
comment = root
path=/
browseable=YES
writeable=YES
valid users= root
only guest=no
create mask=0777
directory mask=07777
public=no
force user = root
force group = root
root 在 passwd 文件中......
当我尝试删除 root 用户时:
sudo smbpasswd -x root
Failed to delete entry for user root.
我认为 Samba 用户数据库一定有问题??
答案1
好的...我想我知道发生了什么。看来 Samba 可执行文件位于两个位置:
maarten@UBUNTU:/usr/local/samba/bin$ whereis smbpasswd
smbpasswd: /usr/bin/smbpasswd /usr/local/samba/bin/smbpasswd
我认为安装出了问题。我手动升级到了最新的 Samba 版本。但看起来 smbpasswd 命令仍然指向旧版本。