摘要:1. echo "newpasswd" | passwd --stdin username 密码中不能有特殊字符串(如引号),修改完后 history -c2. 先新建一个临时文件tmppasswd.txt放置账号密码,内容格式 username:newpasswd(sunnom:123456) 再用命令修改 chpasswd < tmppasswd.txt 密码是明文文件,可以使用特殊字符串3. 先用openssl passwd -1 生成密码,再写入tmppasswd.txt(root:$1ri2hceVU$WIf.firUBn97JKswK9E) 再用命令修改
阅读全文
posted @ 2014-03-30 22:51