sudo broke on ubuntu?


Results 1 to 11 of 11

Thread: sudo broke on ubuntu?

  1. #1
    Join Date
    Oct 2002
    Location
    UK
    Posts
    254

    sudo broke on ubuntu?

    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:
    Code:
    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:
    Code:
    sudo usermod -G robin,adm,dialout,cdrom,floppy,audio,dip,video,plugdev,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

  2. #2
    Join Date
    Oct 2002
    Location
    Illinois
    Posts
    3,281
    chmod -R 0700 /var/run/sudo

  3. #3
    Join Date
    Mar 2003
    Location
    Tampa, FL USA
    Posts
    2,193
    $ 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

  4. #4
    Join Date
    Oct 2002
    Location
    UK
    Posts
    254
    ..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

  5. #5
    Join Date
    Mar 2003
    Location
    Tampa, FL USA
    Posts
    2,193
    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

  6. #6
    Join Date
    Oct 2002
    Location
    Illinois
    Posts
    3,281
    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

  7. #7
    Join Date
    Oct 2002
    Location
    UK
    Posts
    254
    I'll post that info when i get home tonight.

    Thanks sepero!

    --Robin

  8. #8
    Join Date
    Oct 2002
    Location
    UK
    Posts
    254
    OK, so the livecd thing worked, and it was necessary to use the -R flag.

    Cheers guys!
    --Robin

  9. #9
    Join Date
    Mar 2003
    Location
    Tampa, FL USA
    Posts
    2,193
    Was it "/usr/bin" persmissions? How did it get that way in the first place?

  10. #10
    Join Date
    Oct 2002
    Location
    Illinois
    Posts
    3,281
    it was /var/ permissions most likely, probably from an upgrade

  11. #11
    Join Date
    Mar 2003
    Location
    Tampa, FL USA
    Posts
    2,193
    I find that doubtful:
    Code:
    $ ls /var/run/sudo
    ls: /var/run/sudo: No such file or directory

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •