Tuesday, April 30, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1864  / 2 Years ago, tue, january 25, 2022, 3:02:22

I have run a script https://github.com/starlilyth/Linux-PoolManager to install it and I have run into the situation where on each sudo command I get the prompt:



[sudo] password for root: 


the /etc/sudoers looks like this now :



-r--r----- 1 root root 823 mar  7 16:07 /etc/sudoers


And I cannot access it.



What can I do now to restore the system to normal functionality ?



EDIT



$grep sudo /etc/group
sudo:x:27:USERNAME

More From » password

 Answers
2

The sudoers file is default like this:



# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

Defaults env_reset

# Uncomment to allow members of group sudo to not need a password
# %sudo ALL=NOPASSWD: ALL

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root ALL=(ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL


This does not contain your user so to be able to use sudo add this:



<username> ALL=(ALL) ALL


That will grant you sudo-access. (If its the best way to do it I'm not sure, but it works for me when I install Debian)



Also, take a look at this community documentation for more information:



https://help.ubuntu.com/community/Sudoers


[#26642] Wednesday, January 26, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rhaeams

Total Points: 115
Total Questions: 111
Total Answers: 103

Location: Burundi
Member since Wed, Nov 25, 2020
4 Years ago
;