samba实现匿名访问的同时对某些目录启用身份验证

这个需求是我在一份比赛题上看见的,实现方式很简单,首先将samba的认证方式改为share,之后在需要启用用户身份验证的共享里加上下面这条语句即可。

guest ok = no

4 thoughts on “samba实现匿名访问的同时对某些目录启用身份验证”

      1. ● smb.service – Samba SMB Daemon
        Loaded: loaded (/usr/lib/systemd/system/smb.service; disabled; vendor preset: disabled)
        Active: failed (Result: exit-code) since Mon 2020-06-08 00:21:16 PDT; 2s ago
        Process: 49136 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE)
        Main PID: 49136 (code=exited, status=1/FAILURE)

        Jun 08 00:21:16 localhost.localdomain systemd[1]: Starting Samba SMB Daemon…
        Jun 08 00:21:16 localhost.localdomain systemd[1]: smb.service: main process e…
        Jun 08 00:21:16 localhost.localdomain systemd[1]: Failed to start Samba SMB D…
        Jun 08 00:21:16 localhost.localdomain systemd[1]: Unit smb.service entered fa…
        Jun 08 00:21:16 localhost.localdomain systemd[1]: smb.service failed.
        Hint: Some lines were ellipsized, use -l to show in full.

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha Code