【问题标题】:bash: change my own password (without using root) [closed]bash:更改我自己的密码(不使用 root)[关闭]
【发布时间】:2013-03-27 09:35:31
【问题描述】:

通常 chpasswd 在设置用户密码方面做得很好。

有没有办法让非特权用户更改自己的密码?

我有兴趣为此编写一个 gtk 前端,最好还需要用户的旧密码。


Change $user password?

      Old password [         ]

      new password [         ]
new password again [         ]

[cancel]               [apply]

寻找

$command
$enter:oldpass
$enter:newpass
password updated

【问题讨论】:

    标签: linux bash passwords


    【解决方案1】:

    当然有,这里是linux的密码教程

    解决办法是

    Task: Set or Change User Password
    
    Type passwd command as follows to change your own password:
    $ passwd
    Output:
    
    Changing password for vivek
    (current) UNIX password:
    Enter new UNIX password:
    Retype new UNIX password:
    passwd: password updated successfully
    
    The user is first prompted for his/her old password, if one is present. This password is then encrypted and compared against the stored password. The user has only one chance to enter the correct password. The super user is permitted to bypass this step so that forgotten passwords may be changed.
    
    A new password is tested for complexity. As a general guideline, passwords should consist of 6 to 8 characters including one or more from each of following sets:
    
        Lower case alphabetics
        Upper case alphabetics
        Digits 0 thru 9
        Punctuation marks
    

    【讨论】:

    • 谢谢。当我意识到 chpasswd 只能作为 root 使用时,我正试图弄清楚。
    猜你喜欢
    • 2017-12-20
    • 1970-01-01
    • 1970-01-01
    • 2011-09-09
    • 2014-04-21
    • 2020-08-01
    • 2017-07-11
    • 2016-02-10
    • 1970-01-01
    相关资源
    最近更新 更多