[Username] is not in the sudoers file and won't add

Screenshot_112304462023

First off, hello everyone!

I’m sorry if this is the wrong spot, please do let me know if so. Thank you.

I just installed Endeavour (I hope correctly!), and upon trying to Update my System, it throws an error as such shown in the image linked.

I have searched extensively for answers, and in regards to adding myself to the sudoers directory, utilizing ‘visudo’ to no avail, I’m unsure if there are other options as I haven’t been able to find any.

I have tried utilizing the Welcome toolbox(?) as well, also to no avail, the only thing different is that I don’t get the same error as seen in the image “-> error refreshing databases - exit status 1”, it just has me press “Enter” to close the terminal.

I’m unsure what I did wrong, and how to fix it,

I’ve been working on this for the last hour, I’m sorry this post is so long.

Thank you for your time and assistance, my apologies once more if this is the wrong spot to post this.

TL;DR: Can’t update System as I’m not recognized in ‘sudoers’, and I probably borked something with initial install.

Post the output of the following commands. Preferably in pastebin.

groups wolf

cat /etc/sudoers

Either the sudoers file doesn’t allow the wheel group to do stuff or you aren’t inside the wheel groups anymore. At least that’s my first guess.

If you need super user access for cat /etc/sudoers, you can just use the command su and log in as root. You need the root password for that.

1 Like

I think I did it correctly…? ~sweat

I did try as ‘su’ as well, I forgot to mention that, I can’t get in at all.

The group wolf command doesn’t show anything?

edit:

Is this a fresh install or did you change some stuff? Seems like you are trying EOS inside a VM, right?

1 Like

what happens if you try to change the password?

1 Like

https://pastebin.com/jwfHFNQy Here’s an updated terminal command, I’m really not sure.

That I would have to check, which might take me a bit.

Ok, you aren’t inside the wheel group, which is probably the problem. What happens if you type su and provide a password?

1 Like

Ah, sorry, no, it’s a fresh install, I changed some icon packs, and installed only two things.

No VM, no dual-boot.

It provides me with root, but even then, I can’t do much else unless there’s a new command I’m missing, which might be the case.

thats what sudo does.

your not in the wheel group you need to add yourself to the wheel group

after you are root you can run updates but only run pacman as root let yay ask for a password.

1 Like

Right, of course, but I cannot do as such, I tried and it would not at all add me to it, I’m unsure as to why.

I feel like I borked something, somehow.

EDIT; Mm, if I can get in, I’ll be sure to do so, I appreciate the advice!

Inside the root environment use this

usermod -a -G wheel wolf

Also post cat /etc/sudoers while we are at it.

2 Likes

cat /etc/sudoers is linked above for the updated command, my apologies.

Or run it after? Probably… Alright, I’ll run ‘visudo’ and the command, much appreciated! Here’s hoping!

Nothing happened when I ran the ‘usermod -a -G wheel wolf’ command.

don’t use this to edit the sudo file that could be what has caused your issue. learn the proper way to do things to avoid issues developed by third partys.

by looks the sudo file is missing.

1 Like

So just ‘su’ and when my User changes just put in the command?

I am honestly trying to learn the proper way to do things.

How do I get the sudo file back, or restore it?

@Too_Dumb_For_This

Did you say you could get to a root shell with su?

If positive, get a root shell and then do:

sudo nano /etc/sudoers.d/wolf

Put in:

wolf ALL=(ALL) ALL

Press Ctrl-O, Enter, Ctrl-X to save the file and exit nano.

Press Ctrl-D to exit the root shell.

Now try your sudo.

3 Likes

yeah seems he has su but not sudo file

never heard of visudo destroying the sudoers file before though. so new for me lol

1 Like

He doesn’t have the /etc/sudoers file ?

1 Like

Just got this now, and this will stay so I can actually Update my System on a basis of when I choose?

In any case, thank you pebcak, and to tack on here, thank you @I0F, and thank you @thefrog, you all have been very helpful, and leaving me with not feeling like I screwed everything up.

Your assistance has been greatly appreciated!

2 Likes