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 to 佐鼬丶 Cancel reply

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

Captcha Code