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.

Rod
  • 117
  • 1
  • 6

2 Answers2

1

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

Steve Robillard
  • 34,687
  • 17
  • 103
  • 109
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>

Abhishek T.
  • 191
  • 1
  • 2
  • 11