Strange issue: sudo: effective uid is not 0, is sudo installed setuid root?
|
2nd Dec, 2013, 08:10 AM
Post: #1
|
|||
|
|||
Strange issue: sudo: effective uid is not 0, is sudo installed setuid root?
After borking my installation by trying to update xbian to beta 2 I did a fresh install to my SD card. In the installation wizard I set updating to automatic, installed the download package, and kept the rest default.
Over the course of an hour or so I set up everything the way I want it, and logged in through SSH. When closing the default xbian-config it told me xbian needed to be rebooted. After doing that and booting again instead of the default notification I got Code: sudo: effective uid is not 0, is sudo installed setuid root? I think it has something to do with enabling automatic updating, but I'm not completely sure. After some searching around I figured out root lost uid0, effectively making it a normal user, as demonstrated by any LS command, for example ls /usr/bin/sudo gives me Code: -rwxr-xr-x 1 xbian root 98712 Mar 3 2013 sudo Since reinstalling xbian won't work, does anyone know how to fix it somehow? edit 1: In the passwd file root is still 0 (root:x:0:0:root:/root:/bin/bash) edit 2: maybe it helps, the only difference I found that might mean something is that before the forced reboot /etc/fstab didn't have a line for /, but after it does. Unfortionally I've already reinstalled xbian so I am unable to check what removing that line does |
|||
2nd Dec, 2013, 07:25 PM
Post: #2
|
|||
|
|||
RE: Strange issue: sudo: effective uid is not 0, is sudo installed setuid root?
Yesterday I reinstalled xbian with automatic updates disabled and the problem isn't occuring again. When I get home tonight I'm going to test it with a different SD card (so I don't ruin my finally working setup) with updates enabled to see if the problem reoccurs, and if it can be fixed as I explained earlier
|
|||
2nd Dec, 2013, 08:12 PM
Post: #3
|
|||
|
|||
RE: Strange issue: sudo: effective uid is not 0, is sudo installed setuid root?
@d4m4s74
technically auto update process runs the same way as manually started with apt upgrade. hard to guess what was the ugly enemy causing this but definitely your file/folder owner ship was changed to xbian - binaries like su, sudo and other low level system utilities have suid bit set to 1 and are (normally owned by root) - so the process can become owned by root regardless of ID of owner of starting process. and because xbian's ownership sudo complained about not having effective id 0. I will recheck package's scripts for any ugly stupid thing with using chown incorrectly. everything is possible. if you wan't help investigating maybe, those packages are -xbmc, -config-shell, -config-xbmc, -tvheadend. should be all. if you hit on this again, let me know. can we exclude any stupid typo like this with chown on your side? (just asking, will check our debs for sure in any case). Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
3rd Dec, 2013, 12:31 AM
Post: #4
|
|||
|
|||
RE: Strange issue: sudo: effective uid is not 0, is sudo installed setuid root?
I haven't used chown at all, I only used a chmod on the nzbget ppscripts folder.
|
|||
3rd Dec, 2013, 01:27 AM
Post: #5
|
|||
|
|||
RE: Strange issue: sudo: effective uid is not 0, is sudo installed setuid root?
can imagine that on ext media but not rootfs, … still I have to admit i was patching some small issues around early boot, fstab mounting and / remount with noatime. barely noticable problems appearing at 1 from 20 reboots but none of it had such huge impact as wrong mounts.
also I found them first only after installing jessie (successor to wheezy still under development). but something happened to you as well. would it be possible for you to put also staging repo to sources.list and upgrade available packages ? Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
3rd Dec, 2013, 01:42 AM
Post: #6
|
|||
|
|||
RE: Strange issue: sudo: effective uid is not 0, is sudo installed setuid root?
Once I get home I'll do a testinstall on a seperate SD, I'll see what I can do.
|
|||
3rd Dec, 2013, 01:59 AM
Post: #7
|
|||
|
|||
RE: Strange issue: sudo: effective uid is not 0, is sudo installed setuid root?
don't spend any unneeded time with this. really.
just use your RPI as you want to. if you don't mind accidental error on screen with not 100% stable package, install them and again just use RPI. if you mind, no problem we have this info now and will take closer look if needed. maybe last question, do you use any external drives (or was any connected during the time when your system collapsed - so one possibility would be bug in usbmount helper tool which by accident would remount rootfs with nosuid option)? Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
3rd Dec, 2013, 07:29 AM
Post: #8
|
|||
|
|||
RE: Strange issue: sudo: effective uid is not 0, is sudo installed setuid root?
(3rd Dec, 2013 01:59 AM)mk01 Wrote: don't spend any unneeded time with this. really. Yes, I had an external harddrive with an NTFS partition. Which could make sense because while I tried to duplicate the circumstances on a different sd card it didn't occur, and at that time I had my external HD connected to my laptop. |
|||
20th Dec, 2013, 01:08 AM
Post: #9
|
|||
|
|||
RE: Strange issue: sudo: effective uid is not 0, is sudo installed setuid root?
(2nd Dec, 2013 08:12 PM)mk01 Wrote: @d4m4s74 Hi mk01, I have the same issue explained in this topic at the moment I have it twice in 2 weeks, this is the second time actually. Last week I rebuild the system from fresh image, but I'm worried why it happens again in the same way. I've connected USB media NTFS which I'm going to replace with new extFat, do you think it should solve this strange issue? Honestly I'd like to solve the issue, do you think there is something should I do? I don't know if can be useful but this is "mount" output: Code: /dev/mmcblk0p2 on / type btrfs (rw,noatime,compress=lzo,ssd,space_cache,autodefrag) Thank you for the help |
|||
21st Dec, 2013, 04:00 AM
Post: #10
|
|||
|
|||
Strange issue: sudo: effective uid is not 0, is sudo installed setuid root?
what is output of:
Code: stat $(which sudo) Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
21st Dec, 2013, 06:11 AM
Post: #11
|
|||
|
|||
RE: Strange issue: sudo: effective uid is not 0, is sudo installed setuid root?
(21st Dec, 2013 04:00 AM)mk01 Wrote: what is output of: Code: xbian@xbian ~ $ stat $(which sudo) |
|||
21st Dec, 2013, 06:17 AM
Post: #12
|
|||
|
|||
RE: Strange issue: sudo: effective uid is not 0, is sudo installed setuid root?
and
Code: ls -la / use pastebin please Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
21st Dec, 2013, 06:45 AM
Post: #13
|
|||
|
|||
RE: Strange issue: sudo: effective uid is not 0, is sudo installed setuid root?
(21st Dec, 2013 06:17 AM)mk01 Wrote: and ls -la / output http://pastebin.com/9dAJghMW ls -la /usr/bin/ http://pastebin.com/xaX2f0xX |
|||
21st Dec, 2013, 07:11 AM
Post: #14
|
|||
|
|||
RE: Strange issue: sudo: effective uid is not 0, is sudo installed setuid root?
edit /boot/cmdline.txt and add "init=/bin/bash" at the end of line
reboot xbian will boot directly into command prompt with root privileges run commands: Code: for f in bin etc lib media mnt opt root sbin usr var xbmc-backup; do chown -R root $f; done then update cmdline.txt again - just revert to previous content (remove init=/bin/bash) after restart Code: sudo dpkg-reconfigure -a Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
21st Dec, 2013, 08:16 AM
Post: #15
|
|||
|
|||
RE: Strange issue: sudo: effective uid is not 0, is sudo installed setuid root? | |||
« Next Oldest | Next Newest »
|
Possibly Related Threads... | |||||
Thread: | Author | Replies | Views: | Last Post | |
Kodi won't start after sudo apt-get upgrade update | karanda | 3 | 13,498 |
21st Nov, 2015 10:16 PM Last Post: karanda |
|
sudo: effective uid is not 0 - returns after fix | rbellamy | 9 | 22,703 |
22nd Dec, 2013 04:34 AM Last Post: mk01 |