Samba 未显示任何共享

Samba 未显示任何共享

当我运行时,smbstatus --shares我看不到列出的股票。

这是我的结尾/etc/samba/smb.conf

[Share]
   path = /var/www
   available = yes
   valid users = robert
   read only = no
   browsable = yes
   public = yes
   writable = yes

其结果如下testparm

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Processing section "[Share]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
        workgroup = MYGROUP
        server string = Samba Server
        server role = standalone server
        log file = /usr/local/samba/var/log.%m
        max log size = 50
        dns proxy = No
        idmap config * : backend = tdb


[homes]
        comment = Home Directories
        read only = No
        browseable = No


[printers]
        comment = All Printers
        path = /usr/spool/samba
        printable = Yes
        browseable = No


[Share]
        path = /var/www
        valid users = robert
        read only = No
        guest ok = Yes

我已经使用 创建了 samba 用户robertsmbpasswd -a robert并且使用 重新启动了 samba sudo service samba restart

编辑:其结果如下smbclient -L 127.0.0.1 -U robert

Domain=[MYGROUP] OS=[Windows 6.1] Server=[Samba 4.3.11-Ubuntu]

        Sharename       Type      Comment
        ---------       ----      -------
        Share           Disk
        IPC$            IPC       IPC Service (Samba Server)
        robert          Disk      Home Directories
Domain=[MYGROUP] OS=[Windows 6.1] Server=[Samba 4.3.11-Ubuntu]

        Server               Comment
        ---------            -------
        SHARE                Samba Server

        Workgroup            Master
        ---------            -------
        MYGROUP              SHARE

答案1

该命令smbstatus --shares列出了与您的 CIFS 共享的实际连接,因此如果没有 SMB 客户端连接,它将不输出任何内容。

查看服务器共享内容的命令如下(请注意,由于 ,不会显示密码提示grep,因此您需要在键入 ENTER 后键入密码):

$ smbclient -L 127.0.0.1 -U myUserName | grep share
Domain=[MYGROUP] OS=[Windows 6.1] Server=[Samba 4.3.11-Ubuntu]
        share          Disk
        robert          Disk      Home Directories

顺便说一句:如果有人使用 ActiveDirectory 来验证他们的用户,该命令wbinfo --ping-dc可以帮助确保你的 Linux 仍然连接到 AD。

相关内容