linux - Getting message "sudo: must be setuid root", but sudo IS already owned by root -


i'm trying run sudo, , it's failing:

gregd@david $ sudo ls sudo: must setuid root gregd@david $ sudo /usr/bin/sudo gregd@david $ ll /usr/bin/sudo -rwxr-xr-x 1 root root 165k 2012-05-16 00:25 /usr/bin/sudo* 

any suggestions on how fix this?

this problem caused when permissions of file, /usr/bin/sudo set 777. if chmod -r 777 /usr/, can this. ruins sudo. here solution if problem, , accepted answer doesn't work:

to fix:

restart pc, press shift @ boot menu.

this should bring gnu grub (ie recovery mode) menu.

  • if doesn't work, restart mid boot , choose recovery mode when prompted on next launch.

select line starts advanced options

select topmost version of os ending ("recovery mode")

press enter

in following menu, go down "drop root shell prompt"

type following:

mount -o remount,rw /  mount --all  chown root:root /usr/bin/sudo  chmod 4755 /usr/bin/sudo  restart 

this should restore sudo privellages.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

php - Dynamic url re-writing using htaccess -

java - Multi-Label Document Classification -