通过puppet添加用户时,我想禁用用户密码.
到目前为止,我已经提出了这个,这似乎有效,但我不确定这有多安全:
user { 'john': ensure => 'present',comment => 'John Smith',groups => ['adm','sudo','wheel','users'],home => '/home/john',managehome => true,shell => '/bin/bash',password => '*',}
正在使用密码=> ‘*’定义被认为可以安全地禁用用户密码?
解决方法 shadow(5)手册页说If the password fIEld contains some string that is not a valID result of crypt(3),for instance ! or *,the user will not be able to use a unix password to log in (but the user may log in the system by other means).
所以是的,使用*是安全的.的! passwd(1)使用加密密码的第一个字符来表示密码被锁定(passwd -l),这可以解锁(passwd -u).
总结以上是内存溢出为你收集整理的linux – 如何通过puppet安全地禁用用户密码?全部内容,希望文章能够帮你解决linux – 如何通过puppet安全地禁用用户密码?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)