Click to See Complete Forum and Search --> : sudo broke on ubuntu?


blingbling!!
12-14-2005, 11:47 AM
Hi

Got a weird one..

I just installed apache/php through synaptic (ubuntu 5.10) and added myself to the www-run group so i can write to the document root. Now sudo karks every time i try it with a cryptic message:

robin@ubuntu:/var/run$ sudo vi /etc/hosts
sudo: /var/run/sudo writable by non-owner (040720), should be mode 0700

I added myself to the www-run group thus:

sudo usermod -G robin,adm,dialout,cdrom,floppy,audio,dip,video,plu gdev,lpadmin,scanner,admin,www-data robin

I made sure to copy over all my old groups b doing a 'groups' then cut'n'pasteing the ones you see in the list.

Any ideas??
Cheers!
--Robin

dkeav
12-14-2005, 07:56 PM
chmod -R 0700 /var/run/sudo

Sepero
12-15-2005, 12:37 AM
$ whereis sudo
sudo: /usr/bin/sudo

WTF? And dkeav, "-R"? Double WTF??

blingbling, what do these commands give you:
ls -l /usr/bin/sudo
echo $PATH

blingbling!!
12-15-2005, 04:25 AM
..ls -l /usr/bin/sudo
Permision denied!!

Thats the weird thing, i can't ls /var/run/sudo cos i don't have permission. The point is that without being able to use sudo I can't fix the sudo problem (that goes for recursive chmod as well!)

Think i'll try moving myself out of the www-run group and see what that does.

--Robin

Sepero
12-15-2005, 05:05 AM
bling, it helps if you post 'exactly' what is output from the terminal.
A) You can copy text out of a xterminal by-
1) Selecting the text.
2) Then, clicking in the paste area with both mouse buttons.

B) It appears you are being denied permission to the directory "/usr/bin".

"drwxr-xr-x" should be the permissions on /usr and /usr/bin. To see what yours are run these:
ls -l /
ls -l /usr

dkeav
12-15-2005, 07:20 AM
use your livecd to fix the problem, chroot into your install and fix your permissions

then it might be a good idea to set a root password for just such an occasion

blingbling!!
12-15-2005, 07:21 AM
I'll post that info when i get home tonight.

Thanks sepero!

--Robin

blingbling!!
12-17-2005, 08:23 AM
OK, so the livecd thing worked, and it was necessary to use the -R flag.

Cheers guys!
--Robin

Sepero
12-17-2005, 12:19 PM
Was it "/usr/bin" persmissions? How did it get that way in the first place?

dkeav
12-17-2005, 02:08 PM
it was /var/ permissions most likely, probably from an upgrade

Sepero
12-18-2005, 01:15 PM
I find that doubtful:$ ls /var/run/sudo
ls: /var/run/sudo: No such file or directory