You are not logged in.

#1 2017-05-24 21:12:45

beachcoder
Member
Registered: 2009-10-08
Posts: 130

"sudo: effective uid is not 0" after update?

Hello!

I'm dealing with a serious problem on my Arch Linux box with Enlightenment as window manager. After todays pacman -Suy, I am not able to run any sudo commands anymore. sudo runs well when I log in directly on a tty without my desktop environment. Running just 'sudo' from an xterm in enlightenment gets me this message:

$ sudo
sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?

I'm not sure how this happens. Any ideas?

Edit: Running just 'su' as well does not work. The prompted password is always reported to be wrong. It seems to be a problem that relates to the process running enlightenment?

Edit2: Downgrading 'linux' to linux-4.10.13-1-x86_64.pkg.tar.xz solved the problem temporarily - I can run sudo now from my desktop enviroment again, so this seems not to be any Enlightenment issue.

Last edited by beachcoder (2017-05-24 21:38:55)

Offline

#2 2017-05-25 02:26:40

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,574

Re: "sudo: effective uid is not 0" after update?

Offline

#3 2017-05-31 23:15:31

drtebi
Member
Registered: 2013-02-09
Posts: 126

Re: "sudo: effective uid is not 0" after update?

I just wanted to post a follow-up to this topic, as I can imagine not everybody knows how to patch a kernel. I didn't...

Here are the steps that I performed in order to apply the patch.

Note that in order to run any privileged commands inside a "broken" Enlightenment,  one can simply switch to another TTY (e.g. press CTRL+ALT+F3).

Install the following packages:

    sudo pacman -S asp xmlto

   
Now prepare a dedicated directory and download the kernel and patch:

    cd ~
    mkdir build
    cd build
    wget https://bugs.archlinux.org/task/54170?getfile=15254 -O linux-ptrace-fix.patch
    ASPROOT=. asp checkout linux

   
Now apply the patch, first do a dry-run:

    cd linux
    patch -p1 --dry-run < ../linux-ptrace-fix.patch

   
If that worked without issues, apply the patch:

    patch -p1 < ../linux-ptrace-fix.patch

   
Before compiling the new kernel, its name should be changed so that it can be distinguished from the
original one. To do so, open ``~/build/linux/trunk/PKGBUILD`` with your favorite editor and change:

    pkgbase=linux               # Build stock -ARCH kernel
    #pkgbase=linux-custom       # Build kernel with a different name

   
to:

    #pkgbase=linux               # Build stock -ARCH kernel
    pkgbase=linux-custom       # Build kernel with a different name

   
Now finally compile the kernel and do something else for an hour or two:

    cd ~/build/linux/trunk
    makepkg

   
Once the new kernel is built, install the new files:

    sudo pacman -U linux-custom-4.11.3-1-x86_64.pkg.tar.xz
    sudo pacman -U linux-custom-headers-4.11.3-1-x86_64.pkg.tar.xz

   
Finally, update the bootloader to load the custom kernel instead of the original one. For
syslinux, open its configuration file:

    sudo jed /boot/syslinux/syslinux.cfg

   
And in the boot section, change all occurences of ``linux`` to ``linux-custom``. This can be
verified by looking at the actual filenames in ``/boot/``.

If everything went fine, then all that is left to do is to reboot the system, and Enlightenment should
allow to use *sudo* etc. again.

I hope that helped someone... Corrections are welcome of course, I am not a kernel-compile-expert.

Last edited by drtebi (2017-05-31 23:16:46)

Offline

#4 2017-05-31 23:19:24

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: "sudo: effective uid is not 0" after update?

Don't include tutorials here: the wiki is where this sort of thing belongs (and is currently documented).


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2017-05-31 23:21:19

drtebi
Member
Registered: 2013-02-09
Posts: 126

Re: "sudo: effective uid is not 0" after update?

Sorry, didn't know that. Where exactly is this documented?

Offline

#6 2017-05-31 23:34:51

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: "sudo: effective uid is not 0" after update?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2017-06-05 16:23:18

marzoul
Member
Registered: 2012-10-29
Posts: 36

Re: "sudo: effective uid is not 0" after update?

Hi,
For me the problem appears with Terminology.
Using gnome-terminal there is no problem, no need to change session nor using another virtual terminal with Ctrl+Alt+Fxx.
So maybe this is just a compatibility issue between Terminology and Linux ?

Offline

#8 2017-06-05 16:27:05

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,750

Re: "sudo: effective uid is not 0" after update?

It is as has been established in the already linked bug report, we'll just have to wait for that fix to trickle down the stable kernel line.

Offline

#9 2017-06-07 22:34:36

89c51
Member
Registered: 2012-06-05
Posts: 741

Re: "sudo: effective uid is not 0" after update?

As it seems the patch hasn't been included in 4.11.4 sad

Offline

#10 2017-06-12 08:37:22

89c51
Member
Registered: 2012-06-05
Posts: 741

Re: "sudo: effective uid is not 0" after update?

Is it possible for the patch to be applied on the 4.11.4 kernel that hit the testing repo??? Kind of bad to have to wait for 4.12 for this to be resolved hmm

Offline

#11 2017-06-12 09:06:46

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,873
Website

Re: "sudo: effective uid is not 0" after update?

Jason linked to the wiki articles about doing just that.

If you mean you would like to see the patch included in the official Arch package, posting on the forums is unlikely to get the package maintainer's attention.


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.

Offline

#12 2017-06-12 09:24:51

loqs
Member
Registered: 2014-03-06
Posts: 17,386

Re: "sudo: effective uid is not 0" after update?

https://git.kernel.org/pub/scm/linux/ke … fork.patch so should be in 4.11.5 when that is released.

Offline

#13 2017-06-13 21:07:16

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: "sudo: effective uid is not 0" after update?

Generally speaking, the kernel package doesn't get patches unless they are already present in the stable queue (thereby indicating it has received the final stamp of approval from upstream) and someone can offer a compelling reason not to wait until the next patch release.

It appears the first criteria is met, so: https://bugs.archlinux.org/task/54170#comment158470


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#14 2017-06-13 21:13:55

loqs
Member
Registered: 2014-03-06
Posts: 17,386

Re: "sudo: effective uid is not 0" after update?

https://lkml.org/lkml/2017/6/12/926

This is the start of the stable review cycle for the 4.11.5 release.
There are 150 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Wed Jun 14 15:24:44 UTC 2017.
Anything received after that time might be too late.

So 4.11.5 could be out in less that 24 hours so not long to wait anyway.

Offline

#15 2017-06-14 14:14:56

89c51
Member
Registered: 2012-06-05
Posts: 741

Re: "sudo: effective uid is not 0" after update?

loqs wrote:

https://lkml.org/lkml/2017/6/12/926

This is the start of the stable review cycle for the 4.11.5 release.
There are 150 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Wed Jun 14 15:24:44 UTC 2017.
Anything received after that time might be too late.

So 4.11.5 could be out in less that 24 hours so not long to wait anyway.

Released and the fix is in. Now we only wait for the kernel to hit the repos. big_smile

Offline

#16 2017-06-14 15:56:58

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: "sudo: effective uid is not 0" after update?

89c51 wrote:

Released and the fix is in. Now we only wait for the kernel to hit the repos. big_smile

Or you can compile it yourself, only takes a bit of time and small changes in the official kernel PKGBUILD.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#17 2017-06-14 17:01:23

89c51
Member
Registered: 2012-06-05
Posts: 741

Re: "sudo: effective uid is not 0" after update?

R00KIE wrote:
89c51 wrote:

Released and the fix is in. Now we only wait for the kernel to hit the repos. big_smile

Or you can compile it yourself, only takes a bit of time and small changes in the official kernel PKGBUILD.

In the context of a distro the "idea" is to not have to do everything by yourself and for yourself but to get and give so the biggest amount of users benefits. For most packages arch is doing a fine job keeping them up to date. There are a few that are problematic (ie E/EFL) but that is a rare case. Also there seems to be a difficulty for the user to get something to reach the Arch repos but that is another topic.

Offline

#18 2017-06-14 20:19:54

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: "sudo: effective uid is not 0" after update?

89c51 wrote:

In the context of a distro the "idea" is to not have to do everything by yourself and for yourself but to get and give so the biggest amount of users benefits. For most packages arch is doing a fine job keeping them up to date. There are a few that are problematic (ie E/EFL) but that is a rare case. Also there seems to be a difficulty for the user to get something to reach the Arch repos but that is another topic.

Yes that's true, and the only two options are wait or recompile it yourself. The kernel having the potential to break things for everyone will take more time to reach the stable repos, if you are affected by the problem and want to wait that's your choice.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB