![首次登录后必须更改 Samba 密码](https://linux22.com/image/34571/%E9%A6%96%E6%AC%A1%E7%99%BB%E5%BD%95%E5%90%8E%E5%BF%85%E9%A1%BB%E6%9B%B4%E6%94%B9%20Samba%20%E5%AF%86%E7%A0%81.png)
如何启用“首次/下次登录后必须更改 samba 密码”?我在 pdbedit 文件中启用了一个功能,但不起作用。
root#/opt/samba/bin/pdbedit -P "user must logon to change password"
account policy "user must logon to change password" description: Force Users to logon for password change (default: 0 => off, 2 => on)
account policy "user must logon to change password" value is: 2
答案1
以下命令将设置用户在下次登录时更改密码,
net sam set pwdmustchangenow username yes
要验证,请输入以下命令并选中“密码必须更改:0”
pdbedit -L -v -u username