编辑:问题实际上是文件丢失错误。仍然无法修复 :/ 丢失的文件是/var/lib/samba/usershares/public
编辑 2:甚至无法访问服务器本身。谷歌搜索后找到了答案。它就在那里 /
基本上,标题说明了一切,但这是我的smb.conf
(没有评论):
[global]
server string = %h server (Samba, Ubuntu)
server role = standalone server
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb
[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
print ok = Yes
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
[public]
path = /home/public/public
valid users = public
read only = No
这是我的目录信息:
total 36K
527845 drwx--x--x 3 public public 4.0K Dec 3 14:45 .
524289 drwxr-xr-x 6 root root 4.0K Dec 3 13:38 ..
527847 -rw-r--r-- 1 public public 220 Dec 3 13:21 .bash_logout
527848 -rw-r--r-- 1 public public 3.7K Dec 3 13:21 .bashrc
527846 -rw-r--r-- 1 public public 8.8K Dec 3 13:21 examples.desktop
527849 -rw-r--r-- 1 public public 675 Dec 3 13:21 .profile
527429 drwxrwxrwx 2 public root 4.0K Dec 3 14:45 public
顺便说一句,抱歉,我对 Samba 还不是很了解。希望你能理解。
提前谢谢,
matemate01
附言:我已经尽力smbpasswd -a public
遵循了教程
这是我的实际错误:
tree connect failed: NT_STATUS_ACCESS_DENIED
答案1
您需要使用smbpasswd
将用户添加到 smb 数据库并设置其密码。
答案2
将主机名更改为少于 15 个字符的名称。netbios name = somethinglessthan15chars
在 中的全局变量部分下写入以下内容: /etc/samba/smb.conf
。