How do i change the password of root, using webmin in one command line?

7,153

Use passwd instead of passwd root (or echo -e "newPassword\nnewPassword" | passwd root"). Moreover, your command have an unexpected '"' at the end too.

Share:
7,153

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    I have lost root password of one old server, where i can only have normal user login and via webmin login. Via webmin interface i have one option to execute command, i have been trying the following but it fails:

    > echo -e "newPassword\nnewPassword" | passwd root"
    bash: -c: line 0: unexpected EOF while looking for matching `"'
    bash: -c: line 1: syntax error: unexpected end of file
    > whoami
    root
    

    via webmin, i can see i am logged in as root