Sunday, April 28, 2024
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 7924  / 1 Year ago, fri, may 12, 2023, 3:13:53

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
newPassword" | 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


More From » command-line

 Answers
5

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


[#30666] Sunday, May 14, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
sconhoney

Total Points: 403
Total Questions: 118
Total Answers: 109

Location: Andorra
Member since Mon, Jan 9, 2023
1 Year ago
sconhoney questions
;