–stdin
     
    
     This
     
      option
      
       is used
       
        to indicate that passwd should
        
         read the new
         
          password
          
           from standard input, which can be a pipe.
          
         
        
       
      
     
    
这个选项用于从标准输入管道读入新的密码。
使用 echo 方式来重置Linux 系统用户密码:
echo “新密码”|passwd –stdin 用户名
| 
           1
           
           2
           
           3
           
           4
           
           5
           
           6
           
           7
           
           8
           
           9
           
           10
           |  | 
这种方式虽然简单,但是通过history命令可以查到用户的密码,所以不安全。
转载于:https://www.cnblogs.com/chengfengchi/p/11308244.html
 
