Samba 和用户帐户密码

Samba 和用户帐户密码

是否可以将您的登录密码与 Samba 密码绑定?

理想情况下,每 30 天,用户需要更改密码才能登录机器,如果可能的话,当他们更新密码时,它也会更新 samba 密码。

答案1

我相信 Samba 默认配置就是这样的,这里是相关行smb.conf

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
    security = user

...

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
    unix password sync = yes

有关这些选项的更多信息以及更多这里. 希望有帮助。

编辑:

第一次添加 Linux 用户(adduser)时,您也需要将其添加到 smbpasswd。

sudo smbpasswd -a <user>

当提示输入密码时使用相同的您在 adduser 中使用的密码。此后,当您使用以下方式更改 Linux 密码时,smb 密码应该会自动更新sudo passwd <user>

答案2

要使更新后的 unix 密码也成为新的 samba 密码,您必须安装该 libpam-smbpass软件包。

相关内容