交互更改密码(oldboy是用户)
[[email protected] ~]# passwd oldboy
Changing password for user oldboy.
New password:
BAD PASSWORD: it is too simplistic/systematic
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
echo 123456|passwd --stdin oldboy //123456是密码,oldboy是用户
Changing password for user oldboy.
passwd: all authentication tokens updated successfully.
但此方法在history中可以看到密码,一下命令可删除历史纪录中某行
history -d 33 //删除历史纪录中某行,33为行数
注:此内容均为自学笔记,纪录较随意,仅供参考,谢谢;
时间: 2024-10-07 06:30:22