sudo: effective uid is not 0 - returns after fix
|
22nd Dec, 2013, 02:22 AM
Post: #1
|
|||
|
|||
sudo: effective uid is not 0 - returns after fix
Similar to @d4m4s74, My recent set of updates has caused a problem with sudo.
In the thread titled "Strange issue: sudo: effective uid is not 0, is sudo installed setuid root?" the solution was to run the following commands: Code: for f in bin etc lib media mnt opt root sbin usr var xbmc-backup; do chown -R root $f; done I did that, ran Code: dpkg-reconfigure -a Lo and behold, the problem is BACK! I've now done this several times, with and without the `dpkg-reconfigure -a`. So then I try to roll back to one of my btrfs snapshots. No luck there: Code: root@lamassu ~ # apt-get install strace And yes, I tried to rollback AFTER I'd fixed up the permissions and before I rebooted again, so presumably the permissions should have allowed the rollback. I'm downloading B2 right now and expect to try a fresh install. This isn't my ideal. Thanks for the awesome project and keep up the good works! |
|||
22nd Dec, 2013, 02:41 AM
Post: #2
|
|||
|
|||
RE: sudo: effective uid is not 0 - returns after fix
another copy is running is maybe only orphan lock … it is directory /tmp/btrfs-snap … if this dir exists and is NOT mountpoint, you can safely rmdir it and. btrfs-auto-snapshot will then run again without "Error: another copy is running .."
btw: rollback or running btrfs user space tool does not need proper permissions or suid bits on executables. btw2; can you with Xenon and d4m4s74 define what you have in common ? probably downloader package or transmission at least, ntfs (fuse) usb disk ? Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
22nd Dec, 2013, 03:02 AM
Post: #3
|
|||
|
|||
RE: sudo: effective uid is not 0 - returns after fix
Another, maybe helpful bit is that the PID I was trying to strace was responsible for a command:
Code: chown xbian -R /tmp I just couldn't figure out what the parent process was that executed that command, and was just beginning my troubleshooting. I'll PM both @Xenon and @d4m4s74 to see if we can figure out some commonality. |
|||
22nd Dec, 2013, 03:38 AM
Post: #4
|
|||
|
|||
RE: sudo: effective uid is not 0 - returns after fix
ok, now it is clear …
the problem is that btrfs-snapshot tool is mounting whole btrfs structure under /tmp to access root of filesystem hierarchy. so being mounted under /tmp/btrfs-snap with all snapshots and subvolumes, it get's chowned. what you can do is: Code: mv /bin/chown /bin/chown.bck then check /tmp/pstree.log later move /bin/chown.bck /bin/chown but you would need root privileges. or use the trick with booting via "init=/bin/bash" . our script should be then started instead of chown binary with only one task, print process tree with PIDs and storing it into /tmp/pstree.log Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
22nd Dec, 2013, 04:00 AM
Post: #5
|
|||
|
|||
RE: sudo: effective uid is not 0 - returns after fix
In case it matters, here's the perms as they stand right now (before the chown mod):
Code: root@lamassu / # ls -alh I'm rebooting with the chown script right now... |
|||
22nd Dec, 2013, 04:01 AM
Post: #6
|
|||
|
|||
RE: sudo: effective uid is not 0 - returns after fix
@rbellamy
for tmp fix edit /usr/sbin/btrfs-auto-snapshot line 25 Code: tmp_dir='/tmp/btrfs-snap' to Code: tmp_dir='/root/btrfs-snap' Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
22nd Dec, 2013, 04:06 AM
Post: #7
|
|||
|
|||
RE: sudo: effective uid is not 0 - returns after fix
And here it is:
Code: root@lamassu ~ # cat /tmp/pstree.log And from your pm request: Code: root@lamassu ~ # grep -inr chown /etc |
|||
22nd Dec, 2013, 04:08 AM
Post: #8
|
|||
|
|||
RE: sudo: effective uid is not 0 - returns after fix
startup script for headphones
I updated the package, headphones ver 1.1.0-1 is on repo apt-get upgrade to install Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
22nd Dec, 2013, 04:28 AM
Post: #9
|
|||
|
|||
RE: sudo: effective uid is not 0 - returns after fix | |||
22nd Dec, 2013, 04:34 AM
Post: #10
|
|||
|
|||
RE: sudo: effective uid is not 0 - returns after fix
reinstalling each package installed
to be honest what I sent is 99% correct (the dirs and ownership is from fresh image extracted by filtering other owners than root). only problem is with special permissions like suid and guid and sticky. but this should be solved by "dpkg-reconfigure -a" … what I proposed to run after general repair after reboot. Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
« Next Oldest | Next Newest »
|
Possibly Related Threads... | |||||
Thread: | Author | Replies | Views: | Last Post | |
Strange issue: sudo: effective uid is not 0, is sudo installed setuid root? | d4m4s74 | 38 | 115,427 |
8th Sep, 2016 11:00 PM Last Post: dgarciam |