-2

I am using debian 12.1.0. I setup a root password while installing but when I go in terminal and use sudo, it prompts me to enter password. I enter it and it shows incorrect. Then I went to settings and there it told me to enter admin password and I entered the same password but it worked this time. I don't think I entered the worng password in terminal cause the password is my own name and I don't think I can mess up my own name. Is this an actual bug or I did something wrong?

1
  • 1
    sudo asks for the actual users password, not the root password.
    – rathier
    Commented Sep 11, 2023 at 17:42

1 Answer 1

-2

What is the error message from sudo? Does it happen to mention sudoers file rather than just sudo: 3 incorrect password attempts? I'm not sure if it's the case since you said putting "admin password" when changing settings (probably you mean putting password into polkit dialog) worked, but it can still be the case.

If so, please add yourself in sudoers file, after running su - from the terminal, and then visudo, and follow the example's instruction to add yourself. Typically, you would want to add the group or username of yourself like [username] ALL=(ALL:ALL) ALL, if you don't have a specific command you want to restrict for the username for yourself.

In my experience, installing debian from installer without carefully setting up conditions you want to have ends up in /etc/sudoers file lacking any user than root, which makes sudo meaningless somehow. But since you can always edit the sudoers file with the method above, it's not a big problem.

1
  • Please be careful about mixing follow-up questions into your Answer. If you need clarification from the asker, that should be in a Comment under the Question. Answers should be self-contained solutions to the Question. Thank you!
    – Jeff Schaller
    Commented Sep 12, 2023 at 11:52

Not the answer you're looking for? Browse other questions tagged .