You are not logged in.

#1 2013-11-16 23:50:49

webpope
Member
Registered: 2013-11-16
Posts: 8

Issues Booting with user allowed to Sudo

Just installed the Arch 11.01 iso.  I'm running gnome-shell with GDM on Nvidia proprietary (331.xx).  I installed sudo with 'pacman -S sudo'.  Everything seems to work just fine.  However, when I add my username to /etc/sudoers or I uncomment the wheel usergroup (of which my user is a part of) Gnome does not boot.  Opening a new TTY as root and enter "exec gnome-session" does not start gnome-shell (though I hear the familiar 'tick' noise).

To get gnome-shell to launch I have to comment out the usergroup and/or I have to completely remove my username entry (username ALL=(ALL) ALL).  It seems gnome does not want me to boot into the environment with a user added to the sudoers file.

What do?

Last edited by webpope (2013-11-16 23:51:33)

Offline

#2 2013-11-16 23:55:46

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Issues Booting with user allowed to Sudo

This should have no bearing whatsoever on whether or not gnome will run.  Can you explain in more detail how you actually set up sudo? 

Also, you cannot simply do exec gnome-session from the TTY.  You have to use either xinit and startx with a valid ~/.xinitrc.

Offline

#3 2013-11-17 00:00:15

webpope
Member
Registered: 2013-11-16
Posts: 8

Re: Issues Booting with user allowed to Sudo

Well gnome runs when the /etc/sudoers file is in its default state.  If I make any modification to it gnome won't run.  Sudo does work in a different tty.  For instance if I log in with my user on tty3 I can sudo nano /etc/sudoers to revert the file.

Offline

#4 2013-11-17 00:00:38

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: Issues Booting with user allowed to Sudo

... and not as root...


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#5 2013-11-17 00:06:44

webpope
Member
Registered: 2013-11-16
Posts: 8

Re: Issues Booting with user allowed to Sudo

Okay, well besides all of that - It will not boot.  If I change /etc/sudoers I get stuck at a black screen on boot where I can not enter any text.  I have to open a new TTY and revert my changes in order to start gnome-shell.

Offline

#6 2013-11-17 00:13:50

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: Issues Booting with user allowed to Sudo

WonderWoofy wrote:

Can you explain in more detail how you actually set up sudo?

Not sure what help you think we can give unless you provide some relevant information. Editing the sudoers file apparently causes issues but we've no idea what you've done to it. You need to post the file so people can look at it.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#7 2013-11-17 00:19:42

webpope
Member
Registered: 2013-11-16
Posts: 8

Re: Issues Booting with user allowed to Sudo

I added my username to it.  It looks something like this:

root ALL=(ALL) ALL
colton ALL=(ALL) ALL

That's it.  That's all I did.  I did uncomment the wheel usergroup but I commented it out after it was giving me the same errors as just entering my username did.

Offline

#8 2013-11-17 00:22:03

webpope
Member
Registered: 2013-11-16
Posts: 8

Re: Issues Booting with user allowed to Sudo

Offline

#9 2013-11-17 00:26:43

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: Issues Booting with user allowed to Sudo

Did you edit the file using visudo?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#10 2013-11-17 00:29:35

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Issues Booting with user allowed to Sudo

For something like that you should use a pastebin.  I really don't want to have to download your sudoers file, simply to view it.

Also you should be using visudo instead of editing the sudoers file directly.  The visudo tool is there to ensure that you are doing things correctly.

Third, instead of adding your name specifically to /etc/sudoers, you should really just take the advice as given in the wiki and use the wheel group as it is intended.  That is, add yourself to the wheel group and then uncomment the line in sudoers that looks something like "%wheel ALL ALL=(ALL)...".  There are two, depending on whether you do or don't want to require a password for sudo. 

One more thing.  I am not sure why you feel as though you need to add root to the sudoers file.  The function of sudo is to temporarily give a normal user root access.  The root user... already has root access...


Edit: Damn, cfr beat me to the visudo thing!

Last edited by WonderWoofy (2013-11-17 00:30:12)

Offline

#11 2013-11-17 00:38:16

webpope
Member
Registered: 2013-11-16
Posts: 8

Re: Issues Booting with user allowed to Sudo

Root is added by default.  I did not add it.  I also said in the OP that if I uncomment the wheel usergroup that gnome-shell won't launch.

Offline

#12 2013-11-17 00:40:52

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Issues Booting with user allowed to Sudo

So if you actually set up an xinitrc, then try to use startx.... does that work?  If not, what kind of output does it give you? 

Also, you should end up with an Xorg.0.log in any case (whether through gdm or startx).  So is there anythign relevant there or maybe in the journal?  Have you looked through the logs at all?

Offline

#13 2013-11-17 00:46:03

webpope
Member
Registered: 2013-11-16
Posts: 8

Re: Issues Booting with user allowed to Sudo

[EDIT: THIS DID NOT WORK.  THE PROBLEMS STILL PERSIST.]

Thanks for your help guys.  The error wasn't caused by gnome or sudo.  It was the user I added.

To anyone coming from google.  I resolved the issue by deleting the user with userdel and creating a new one.  I accidentally added the -G flag without specifying extra groups the user belonged to.  Recreating the same user without the -G flag allowed me to uncomment the wheel usergroup and give my new user sudo permissions.

Last edited by webpope (2013-11-17 13:27:44)

Offline

#14 2013-11-17 13:28:35

webpope
Member
Registered: 2013-11-16
Posts: 8

Re: Issues Booting with user allowed to Sudo

It worked fine yesterday but today when I booted up it failed.  Anyone know what I can do?  The /etc/sudoers file is in its default state right now.  Making any modification will stop gnome from starting.

Offline

#15 2013-11-17 13:40:41

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,721
Website

Re: Issues Booting with user allowed to Sudo

The log file that WonderWoofy asked for would be useful, as would the journal output for your login manager (assuming you use one)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

#16 2013-11-17 13:49:59

mojtabazn
Member
Registered: 2013-10-20
Posts: 65

Re: Issues Booting with user allowed to Sudo

lets try from start :

at first delete your current user name and then

 useradd -m -g users -G wheel,storage,power -s /bin/bash yourusername 

and choose a password for created user

passwd yourusername

then you should uncomment wheel  line by  visudo

EDITOR=nano visudo

and uncomment this line

%wheel ALL=(ALL) ALL

thats it if you have problem with user

Last edited by mojtabazn (2013-11-17 13:51:35)

Offline

#17 2013-11-17 13:56:49

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,721
Website

Re: Issues Booting with user allowed to Sudo

You don't need to be in storage or power groups.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

#18 2013-11-17 23:21:24

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: Issues Booting with user allowed to Sudo

In fact, being in those groups can cause trouble.

@mojtabazn,
Please refer users to the appropriate parts of the Beginners' Guide and/or wiki rather than providing step-by-step instructions for standard tasks. Not only does that help users to familiarise themselves with the resources available, but it means the information is more likely to be useful for future users who find the thread even if the details have changed. (Also, it avoids the possibility of your passing on out dated information inadvertently as well.) Obviously, there are exceptions to this if something is too non-standard or if the wiki is out of date itself. (But in that case, better to update the wiki and refer the user back there than put the information here and leave the outdated information in the wiki to mislead others!)

@webpope,
You need to provide some of the information people have asked for. Either post it here using

code tags

or put it on a pastebin, as WonderWoofy suggested and link there. Few people will download files just to see if they might be able to help - far more are likely to take a look if it is right here and easy to parse (hence the code tags) or, even, on a simple pastebin. Until you start giving us information, there really isn't much of anything anybody can do to help you.

Last edited by cfr (2013-11-17 23:22:19)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#19 2013-12-20 00:03:30

peacemaker
Member
Registered: 2013-12-19
Posts: 4

Re: Issues Booting with user allowed to Sudo

This thread interests me because it has a display manager problem on nvidia like my problem. I registered just for this. I will come back if I solve it.

I think the original poster is correct. sudo might be broken since the arch upgrade.

I ran
pacman -Syu

and I broke my ability to run lightdm on nouveau, a nvidia replacement. startx works. nouveau works. lightdm fails with this log message:

** (process:453): WARNING **: Error reading existing Xauthority: Failed to open
file '/var/lib/lightdm/.Xauthority': Permission denied
Error writing X authority: Failed to open X authority /var/lib/lightdm/.Xauthori
ty: Permission denied

That error could occur if scripts are trying to create files like Xauthority by using sudo. I see no permission problem on the lightdm subdirectory (according to pacman -Qkk ... It is a query check. I forget the full name ).


Here are my clues after executing these:
sudo su
or
sudo


sudo: unable to stat /etc/sudoers: Permission denied
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

ls -al /etc/sudoers
-r--r----- 1 root root 2845 Dec 19 18:19 /etc/sudoers


I tried to resolve by installing other display managers and I only get simple startx to run with no cinnamon and not gdm and not numerous other online solutions to fix lightdm, which was working fine with the Sept 2013 arch release. I am new to arch. I left ubuntu.

Offline

#20 2013-12-20 00:20:15

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Issues Booting with user allowed to Sudo

I'm not sure if your issue is the same as OP's. Maybe it's best to start a new thread and add a link to this one?

Have you dealt with any .pacsave files created by the update?
sudo has been updated in early October https://www.archlinux.org/packages/core/i686/sudo/ and it seems to be working for almost everyone.

Offline

#21 2013-12-20 00:27:03

peacemaker
Member
Registered: 2013-12-19
Posts: 4

Re: Issues Booting with user allowed to Sudo

I found an old sudo inside my /var/cache/pacman/pkg and I ran -R and then -U to downgrade and sudo still fails.

So now I think there is a problem with the password pam system somewhere. That would explain sudo failing.

(This is just a fast assessment. Maybe I am way off track and I should experiment more first but I might not get be able to post later, as a break my computer some more. lol)

Edit: I just saw Karol. I still think it is a good match to this thread. I did deal with the pacsaves and pacnew. Maybe I missed one.  I will read that link also. Thank-you.

Last edited by peacemaker (2013-12-20 00:38:39)

Offline

#22 2013-12-20 01:34:56

peacemaker
Member
Registered: 2013-12-19
Posts: 4

Re: Issues Booting with user allowed to Sudo

Here is shocker (to me) solution to sudo. Now sudo works.

chmod go+rx /

How did the root permissions shown by
ls /

get changed to just drwx------   on my system?

Now sudo works after I did that chmod on the root  /

I saw the answer here: http://forums.gentoo.org/viewtopic-t-94 … art-0.html   posted by truc.

Next I will try lightdm.

Offline

#23 2013-12-20 02:14:23

peacemaker
Member
Registered: 2013-12-19
Posts: 4

Re: Issues Booting with user allowed to Sudo

I ran

pacman -Qkk 2>xx

to see save a bunch of warnings of missing files and wrong owners into a list called xx. My system must have gotten damaged by pacman -Syu while the root had the wrong permission from something else I did upgrading flashplugin from adobe, I guess.

So I fixed those and now lightdm works.  I am very disturbed regarding how this happened. I might have some other damage in spots.  That took me 16 hours to solve because you can see the log error messages seemed unrelated to the problem and pacman never complained about the permissions, I guess because sudo was causing the defect.

Does anybody know how to fetch and overwrite files?  pacman -Syu says nothing is needed. I had to name individual names to reinstall them.


Another topic:
Now I have a screen full of useless lightdm icons. I have to remember how to scrap all the 5 acres of icon nonsense and get back to a nice tight text menu.
I think it is in the settings. If anybody knows, please tell.

I think I fixed the thread originator's problem, if he is still stuck.

Last edited by peacemaker (2013-12-20 02:20:29)

Offline

#24 2017-10-03 03:24:04

whyoy
Member
Registered: 2017-10-03
Posts: 3

Re: Issues Booting with user allowed to Sudo

peacemaker wrote:

Here is shocker (to me) solution to sudo. Now sudo works.

chmod go+rx /

How did the root permissions shown by
ls /

get changed to just drwx------   on my system?

Now sudo works after I did that chmod on the root  /

I saw the answer here: http://forums.gentoo.org/viewtopic-t-94 … art-0.html   posted by truc.

Next I will try lightdm.



This is crazy to me.... somehow this fixed the issue with me as well.

Sudo 1.8.21p2
Frensh Arch install, sudo install.

Thanks guys.

Offline

#25 2017-10-03 03:31:30

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: Issues Booting with user allowed to Sudo

Please do not necrobump old threads.

Offline

Board footer

Powered by FluxBB