0

I was trying to change the default password for my raspberry pi and I used sudo passwd instead of just passwd. What did I change when I used sudo passwd?

It didn't even ask me to enter the current password. It just asked me to enter a new password and confirm it.

1

By using sudo you are executing the command as root. So, in this case you changed the password for the root account.

0

sudo provide you the root access, it executes command as root. So using sudo passwd command you can reset/change the root password on any Linux based operating system. There is no direct security risk.

You can use it as following:

$ sudo passwd <your username>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.