linux下如何更改密码?
[root]# passwd
Changing password for user root.
New password:
Retype new password:
Sorry, passwords do not match.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
出现 successfully 这句话,证明已经更改成功
还有一种较为简单的修改密码:
[root@localhost scripts]# useradd -d /data/james -g myftp james [root@localhost scripts]# echo "james123" | passwd --stdin james Changing password for user james. passwd: all authentication tokens updated successfully.
给用户james 设置密码 为 james123