Skip to main content
added 244 characters in body
Source Link
John1024
  • 76.4k
  • 12
  • 176
  • 165

It is configurableconfigurable* but, by default, sudo"sudo" asks you for your password. It is just trying to make sure that it is you, not someone using your keyboard while you were getting coffee.

By contrast, "su root" asks you for the root password.


*If targetpw in /etc/sudoers is false (default), "sudo" asks you for your password. If it is true, then "sudo" asks you for the password of root or, if you specified some other user with the "-u" option, the password of that user.

It is configurable but, by default, sudo asks you for your password. It is just trying to make sure that it is you, not someone using your keyboard while you were getting coffee.

By contrast, "su root" asks you for the root password.

It is configurable* but, by default, "sudo" asks you for your password. It is just trying to make sure that it is you, not someone using your keyboard while you were getting coffee.

By contrast, "su root" asks you for the root password.


*If targetpw in /etc/sudoers is false (default), "sudo" asks you for your password. If it is true, then "sudo" asks you for the password of root or, if you specified some other user with the "-u" option, the password of that user.

Source Link
John1024
  • 76.4k
  • 12
  • 176
  • 165

It is configurable but, by default, sudo asks you for your password. It is just trying to make sure that it is you, not someone using your keyboard while you were getting coffee.

By contrast, "su root" asks you for the root password.