无论我如何尝试,Samba 共享在尝试通过 Windows 连接时都会提示登录

无论我如何尝试,Samba 共享在尝试通过 Windows 连接时都会提示登录

我正在尝试创建完全公开的 Samba 共享,以便任何人都可以通过网络访问它们。但是,无论我输入什么配置选项,我总是会收到登录提示,而这并不是我想要的。这是我当前的配置:

[global]
        path = /home/dataserver/
        read only = no
        guest ok = yes
        writable = yes
        force user = dataserver
        follow symlinks = yes
        wide links = yes
        unix extensions = no
        avaliable = yes
        browseable = yes
        public = yes
        security = user
        server string = DataServer
        guest account = root
        public = yes
        avaliable = yes

[Accounts]
        description = Accounts Folder
        path = /home/dataserver/Accounts/
        read only = no
        guest ok = yes
        writable = yes
[Backup]
        description = Backup Folder
        path = /home/dataserver/Backup/
        read only = no
        guest ok = yes
        writable = yes
[Databases]
        description = Databases Folder
        path = /home/dataserver/Databases/
        read only = no
        guest ok = yes
        writable = yes

答案1

Ubuntu 提供的默认 smb.conf 包含一个您 smb.conf 中缺少的参数。如果不覆盖 samba 默认设置,其map to guest = Never作用与听起来的一样 - 绝不允许访客访问。

通过将以下内容添加到 smb.conf 的 [global] 部分来恢复丢失的覆盖:

map to guest = Bad User

然后重新启动smbd:

sudo service smbd restart

相关内容