Samba 和用户帐户密码

Muh*_*ana 19 samba password 12.04

是否可以将您的登录密码与您的 samba 密码相关联?

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

jpe*_*sen 28

我相信默认情况下 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
Run Code Online (Sandbox Code Playgroud)

...

# 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
Run Code Online (Sandbox Code Playgroud)

有关这些选项的更多信息以及更多信息,请访问此处。希望有帮助。

编辑:

第一次添加 linux 用户 ( adduser) 时,您还需要将它们添加到 smbpasswd。

sudo smbpasswd -a <user>

当提示输入密码时,请使用与 adduser相同的密码。在此之后,当您使用以下命令更改 linux 密码时,smb 密码应自动更新sudo passwd <user>