I want to use the sudo command but whenever I type it I see a message that says void is not in the sudoers file, this incident will be reported. I tried finding a way to fix it, and the told me to type su root then follow the next steps, but when I type su root it says authentication failure No problem, lets just fix that right? Well then they tell me to type in sudo which I cant use so I need a different way of solving this problem, would you mind helping me out?
Asked
Active
Viewed 801 times
1
-
When you tried to log in did you enter your username as well as password? For one of my systems I must enter both – John Sep 17 '22 at 18:16
-
The name I need to log in is void, but I have another name so can you tell me what it is for – Monetary gain Sep 17 '22 at 18:49
-
John log in where? And how would I do what you told me to – Monetary gain Sep 17 '22 at 18:50
-
Your user ("void") simply has no root permissions. Log in with a different account which has root and add yourself to the sudoers file. – Bip901 Sep 17 '22 at 19:40
-
Restart and there should be a login screen. True for all operating systems. – John Sep 17 '22 at 20:36
-
If you have no root account setup and no sudo access you wil have to reboot and get in to root shell at grub prompt and then add your self to sudoers file. – Petepf Sep 18 '22 at 01:13
-
can you explain – Monetary gain Sep 18 '22 at 19:26
-
I am not familiar with debian and its terminal sorry – Monetary gain Sep 18 '22 at 19:31
-
This article will show you how to set root password so you can use "su root" command. https://linuxconfig.org/recover-reset-forgotten-linux-root-password – Petepf Sep 19 '22 at 03:32
1 Answers
0
It's not enough to install the sudo program. You must have root permissions (meaning you have to be the admin user) to grant your user the required permissions to use sudo.
Use the visudo command to grant yourself the permissions (this will open vi text editor and has example lines you can just copy paste, type :wq and Enter to save & exit) or add the user to "wheel" group with usermod -aG wheel void as the root user.
-
1As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 17 '22 at 22:31
-
It says usermod not found. I am not familiar with the terminal if that helps – Monetary gain Sep 18 '22 at 19:31