I chowned -R username /usr/lib and now i cannot sudo or do any thing really due to sudoers.so belonging to username.
How do i fix this and make /usr/lib owned by root again?
I chowned -R username /usr/lib and now i cannot sudo or do any thing really due to sudoers.so belonging to username.
How do i fix this and make /usr/lib owned by root again?
grub
. Select recovery mode. Enter root shellmount / -o rw,remount
chown -R root:root /usr/lib
. Once done, reboot.Try with one of the following :
sudo chown [USERNAME]:root /usr/lib
Or
sudo chmod 0755 /usr/lib
Use option -R
with chown
if its just for recursive.
this is the error it gives me. I also cannot boot into recovery mode by holding shift. I think its because this instalation has been done on top of a w8 OEM laptop.
any ideas?
– Henrik Harju Dec 12 '13 at 17:35chown
without -R. Before reinstall, just try with pkexec chown root /usr/lib/sudo/sudoers.so
or pkexec chmod go-w /usr/lib/sudo/sudoers.so
–
Dec 12 '13 at 17:54
It's very easy! Boot with Instalation CD (Ubuntu), and go to /media/ubuntu/(your disk Ubuntu), then execute:
sudo chown root -R /usr/lib
/usr/lib
are root
owned so simply running chown
again won't resolve this..this is a failrly complex situation..
– heemayl
Jun 19 '15 at 18:42
/usr/lib
areroot
owned so simply runningchown
again won't resolve this..this is a failrly complex situation.. – heemayl Jun 19 '15 at 18:43ls -l /usr/lib/* | less
all files are owned by root. group ownership was all root, exceptdrwxr-xr-x 2 root utempter 4096 Feb 18 21:48 utempter
. For that directory the group ownership was root. That's all. This should fix most of the problem – Sergiy Kolodyazhnyy Jun 19 '15 at 19:19find /usr/lib -ls | awk '{print $5" "$6}' | grep -v root
also no problem – Sergiy Kolodyazhnyy Jun 19 '15 at 19:23