日期:2014-05-16 浏览次数:20722 次
RedHat Linux 9 + VWWare 7.1.2 + Putty 0.62
Linux更改用户密码
1.如果你是以普通用户登录的话,修改自己的密码,使用passwd命令。会让你先输入自己的旧密码,再输入两遍新密码。
[wgb@localhost root]$ passwd Changing password for user wgb. Changing password for wgb (current) UNIX password: New password: Retype new password: passwd: all authentication tokens updated successfully. [wgb@localhost root]$ [wgb@localhost root]$ passwd wgb passwd: Only root can specify a user name.
2.如果你是root用户登录的话,使用passwd root或者passwd,就可以修改root的密码。直接输入两遍新密码就可以了,不用输入旧密码。
[root@localhost root]# passwd Changing password for user root. New password: BAD PASSWORD: it is too short Retype new password: passwd: all authentication tokens updated successfully. [root@localhost root]# [root@localhost root]# passwd root Changing password for user root. New password: BAD PASSWORD: it is too short Retype new password: passwd: all authentication tokens updated successfully. [root@localhost root]#
root用户登录,打开终端,执行 echo "你想设置的密码" | passwd --stdin 用户名
[root@localhost root]# echo "wgb" | passwd --stdin wgb Changing password for user wgb. passwd: all authentication tokens updated successfully.
http://zhidao.baidu.com/question/257557942.html
@Wentasy 博文仅供参考,欢迎大家来访。如有错误之处,希望批评指正。原创博文如需转载请注明出处,谢谢 :) [CSDN博客] |