用户无法登录 Samba 共享

用户无法登录 Samba 共享

我将在这里介绍版本号和硬件;我有一个运行 Raspbian 9.6 Stretch headless 的 Raspberry Pi 3B+,我有一个 2TB 的 USB 驱动器作为存储介质,并且我正在运行 Samba 版本 4.5.12-Debian。

至于客户端,他们都运行 Windows 10 1607 个人版或 LTSB 版。

这是我的 Samba 配置文件;

# "testparm" to check that you have not made any basic syntactic 
# Written for Bistack on Raspberry Pi



#======================= Global Settings =======================
[global]
## Core Networking Options ##
    netbios name        = Bistack
    workgroup       = Cadosphere
    encrypt passwords   = yes
    min protocol        = smb2

## Netbios Name Service Settings ##
    wins support        = yes
    dns proxy       = no

## Debugging/Accounting ##
    log file        = /var/log/samba/log.%m
    log level       = 1
    max log size        = 1000
    panic action        = /usr/share/samba/panic-action %d

## Authentication ##
    server role     = standalone server
    passdb backend      = tdbsam
    obey pam restrictions   = yes
    unix password sync  = no
    passwd program      = /usr/bin/passwd %u
    passwd chat     = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    pam password change = yes
    map to guest        = bad user
    ntlm auth       = true
    security        = user  



#======================= Share Definitions =======================
## Core Samba shares and networked devices ##
[homes]
    comment     = Home Directories  
    browseable  = no
    read only   = yes
    create mask = 0700
    directory mask  = 0700
    valid users = %S

[profiles]
    comment     = Users profiles
    path        = /home/samba/profiles
    guest ok    = no
    browseable  = no
    create mask = 0600
    directory mask  = 0700

[printers]
    comment     = All Printers
    browseable  = no
    path        = /var/spool/samba
    printable   = yes
    guest ok    = no
    read only   = yes
    create mask = 0700

[print$]
    comment     = Pointer for Windows clients to find the proper Printer Drivers
    path        = /var/lib/samba/printers
    browseable  = yes
    read only   = yes
    guest ok    = no

## Multi-User General Shares ##
[cadosphere]
    comment     = Network folder for Cadosphere projects
    path        = /~/nas/cadosphere
    valid users = matt
    admin users = cadosphere
    read only   = no
    browseable  = yes
    public      = yes
    writeable   = yes

[shared]
    comment     = Network folder for anyone on the network
    path        = /~/nas/shared
    gues        = okay
    read ony    = no
    browseable  = yes
    public      = yes
    writeable   = yes

## Single-User Dedicated Shares ##
[matt]
    comment     = Matts network share
    path        = /~/nas/matt
    valid users = matt
    force user  = matt
    read only   = no
    browseable  = yes
    public      = yes
    writeable   = yes

在 Windows 客户端上,所有共享都会显示,但是当您去访问它们时,Samba 会要求输入密码(应该如此),并且用户无法进行身份验证并访问他们的共享。当他们尝试时,他们会收到一条错误消息,提示该位置不可用。

我还设置了一个名为的公共共享shared,其运行正常。

我使用了该命令sudo pdbedit -L,列出了我已设置并添加到 Samba 的两个用户帐户。

据悉smbstatus,唯一一个连接服务器的用户帐户名为nobody

我尝试重新安装 Samba 和 Samba-common,并在本论坛上寻找了几个答案。

相关内容