Results 1 to 10 of 10

Thread: sudo: /etc/sudoers is mode 0640, should be 0440

  1. #1
    Join Date
    Feb 2011
    Location
    Southampton, UK
    Beans
    131
    Distro
    Ubuntu

    sudo: /etc/sudoers is mode 0640, should be 0440

    Hi All that read this.
    How to I change this?

    asjmm@asjmm-Saviour:~$ sudo /etc/init.d/samba stop
    sudo: /etc/sudoers is mode 0640, should be 0440
    sudo: no valid sudoers sources found, quitting
    asjmm@asjmm-Saviour:~$
    Thanks.
    Andy
    SAABS, SLOT REAL ALE RED WINE "Looks no object, it's your soul I want!"Computer Home built, AMD thingy, 4gig and 1T of HDD. Coffee stains. Well of course it does.

  2. #2
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!

    Re: sudo: /etc/sudoers is mode 0640, should be 0440

    Hi,

    Boot into Recovery Mode and change the file's permissions back to 0440. See: http://psychocats.net/ubuntu/fixsudo

  3. #3
    Join Date
    Aug 2005
    Location
    South Carolina, USA
    Beans
    22,266
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: sudo: /etc/sudoers is mode 0640, should be 0440

    I don't know for absolutely sure, but I'd try:
    Code:
    sudo su
    chmod 0440 /etc/sudoers
    exit
    "Oh, Ubuntu, you are my favorite Linux-based operating system" --Dr. Sheldon Cooper, Ph.D.

  4. #4
    Join Date
    Feb 2011
    Location
    Southampton, UK
    Beans
    131
    Distro
    Ubuntu

    Re: sudo: /etc/sudoers is mode 0640, should be 0440

    Thanks Chilli, but that did not work.
    I'll give Sisco a try.
    Cheers Guys.
    SAABS, SLOT REAL ALE RED WINE "Looks no object, it's your soul I want!"Computer Home built, AMD thingy, 4gig and 1T of HDD. Coffee stains. Well of course it does.

  5. #5
    Join Date
    Feb 2011
    Location
    Southampton, UK
    Beans
    131
    Distro
    Ubuntu

    Re: sudo: /etc/sudoers is mode 0640, should be 0440

    OK, so I have tried Chills example. Dame system did not want to reboot into UBUNTU 10 .
    After trying the recovery side of things, Got nowhere. I have had to reinstall. So, lets do the 11 bit.
    This is fun...It did not fully install. Opening another thread.
    Cheers Guys.

    Hi all. OK, after a tip I was given to change sudo
    sudo su chmod 0440 /etc/sudoers
    exit
    My system said enough is enough and stopped booting, would not come up. BLACK screen.
    I followed the recovery process, but still a no go. I do think the system was unstable before the above code.
    So, decided to upgrade to 11.04. But that did not fully work either. Somethings just not working. i.e. UBUNTU Software center. That star just keeps spinning, around and around. I left it for a time, went and had dinner. so good 30 minutes, got back, and still she is turning.
    So looked here and found this.

    sudo apt-get update
    After it does what it does, lots of lines with you know what. It ends with


    Reading package lists... Error!
    E: Encountered a section with no Package: header
    E: Problem with MergeList /var/lib/apt/lists/extras.ubuntu.com_ubuntu_dists_natty_main_binary-amd64_Packages
    E: The package lists or status file could not be parsed or opened.
    So, my first problem needs to be solved before I go to the next one.

    Help needed guys, Please.
    Last edited by 9000cse; June 24th, 2011 at 12:22 AM.
    SAABS, SLOT REAL ALE RED WINE "Looks no object, it's your soul I want!"Computer Home built, AMD thingy, 4gig and 1T of HDD. Coffee stains. Well of course it does.

  6. #6
    Join Date
    Aug 2005
    Location
    South Carolina, USA
    Beans
    22,266
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: sudo: /etc/sudoers is mode 0640, should be 0440

    I do think the system was unstable before the above code.
    I think that's your issue, not the permissions of sudoers. It is simply a file; a list of who on the system is allowed to use 'sudo.' Even if the permissions were galaxy-wide, I believe it would simply reduce security and cough out a warning, as you saw.

    I executed the commands I suggested above and nothing changed; it didn't change because the mode was 0440 before and after I did the command.
    chili@LAPTOP60:~$ ls -al /etc | grep sudoers
    -r--r----- 1 root root 574 2011-04-15 11:54 sudoers
    drwxr-xr-x 2 root root 4096 2011-06-12 11:25 sudoers.d
    chili@LAPTOP60:~$ sudo su
    [sudo] password for chili:
    root@LAPTOP60:/home/chili# chmod 0440 /etc/sudoers
    root@LAPTOP60:/home/chili# exit
    exit
    chili@LAPTOP60:~$ ls -al /etc | grep sudoers
    -r--r----- 1 root root 574 2011-04-15 11:54 sudoers
    drwxr-xr-x 2 root root 4096 2011-06-12 11:25 sudoers.d
    "Oh, Ubuntu, you are my favorite Linux-based operating system" --Dr. Sheldon Cooper, Ph.D.

  7. #7
    Join Date
    Aug 2010
    Location
    Between Heatsink and CPU
    Beans
    538
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: sudo: /etc/sudoers is mode 0640, should be 0440

    Reading package lists... Error!
    E: Encountered a section with no Package: header
    E: Problem with MergeList /var/lib/apt/lists/extras.ubuntu.com_ubuntu_dists_natty_main_binary-amd64_Packages
    E: The package lists or status file could not be parsed or opened.
    From a Terminal prompt, copy paste all the commands one by one :

    1.
    Code:
    cd ~
    2.
    Code:
    mkdir lists
    3.
    Code:
    cd  /var/lib/apt/lists
    4.
    Code:
    sudo cp -r *  /home/username/lists
    (make sure to replace 'username' with your actual username)
    5.
    Code:
    sudo rm -r *
    (Make sure that you still are in '/var/lib/apt/lists' before executing this command !)
    6.
    Code:
    sudo apt-get update && sudo apt-get dist-upgrade
    This will get rid of this error for sure. Once the error go away and you can successfuly update and upgrade your system, you can safely delete the 'lists' folder in your home folder. But to be honest if you keep getting strange errors, try to go with a full reinstall, maybe somehting during the upgrade borked your system.

    hope this helps
    Last edited by e79; June 24th, 2011 at 05:22 AM.

    ** My Blog
    **

  8. #8
    Join Date
    Feb 2011
    Location
    Southampton, UK
    Beans
    131
    Distro
    Ubuntu

    Re: sudo: /etc/sudoers is mode 0640, should be 0440

    Thanks e79, that is the biz. seems to be OK. Stable at least and USC now works.
    Cheers Andy

    Now [SOLVED]
    SAABS, SLOT REAL ALE RED WINE "Looks no object, it's your soul I want!"Computer Home built, AMD thingy, 4gig and 1T of HDD. Coffee stains. Well of course it does.

  9. #9
    Join Date
    Aug 2010
    Location
    Between Heatsink and CPU
    Beans
    538
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: sudo: /etc/sudoers is mode 0640, should be 0440

    I'm glad we corrected the issue ! As for marking the Thread as [SOLVED], it should be done via the thread tools

    Best Regards

    e79

    ** My Blog
    **

  10. #10
    Join Date
    Feb 2011
    Location
    Southampton, UK
    Beans
    131
    Distro
    Ubuntu

    Re: sudo: /etc/sudoers is mode 0640, should be 0440

    Yes, and thanks again. As for Solving. Always wondered where that hid.
    Thanks again.
    Andy
    SAABS, SLOT REAL ALE RED WINE "Looks no object, it's your soul I want!"Computer Home built, AMD thingy, 4gig and 1T of HDD. Coffee stains. Well of course it does.

Tags for this Thread

Bookmarks

Posting Permissions

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