Announcement

Collapse
No announcement yet.

SOLVED sudo: /etc/sudoers is mode 0777, should be 0440

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    SOLVED sudo: /etc/sudoers is mode 0777, should be 0440

    I change the permissions to make the vsftpd writable and now can not change it back ,how can I change permissions on the etc folder back?

    jason@Jason-PC:/$ sudo apt-get update
    sudo: /etc/sudoers is mode 0777, should be 0440
    sudo: no valid sudoers sources found, quitting
    jason@Jason-PC:/$ sudo apt-get -R chmod 440
    sudo: /etc/sudoers is mode 0777, should be 0440
    sudo: no valid sudoers sources found, quitting
    jason@Jason-PC:/$
    Computer are like air conditioners: they stop working when you open windows!<br /><br />Linux : Because you wouldnt put a Porsche&#39;s engine in a Pinto<br /><br />case : HAF 932<br />mother board: ASUS p5e3<br />processor: Intel e8500 3.16 GHz<br />RAM: 8 GB Corsair DDR3 1600<br />power supply: Corsair 850W<br />video card: GeForce 8400

    #2
    Re: sudo: /etc/sudoers is mode 0777, should be 0440

    Boot into recovery mode, choose the root shell, and:

    chmod 440 /etc/sudoers

    next time edit with sudo visudo

    We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

    Comment


      #3
      Re: sudo: /etc/sudoers is mode 0777, should be 0440

      I just booted into recovery mode and ran the chmod 440 /etc/sudoers but when I restart the computer and tried to update I get this error.


      jason@Jason-PC:~$ sudo apt-get update
      sudo: /etc/sudoers.d/README is mode 0777, should be 0440
      >>> /etc/sudoers: /etc/sudoers.d/README near line 24 <<<
      sudo: parse error in /etc/sudoers near line 24
      sudo: no valid sudoers sources found, quitting


      Does this mean I did something wrong or did that command just not take? I will try it again. Thanks for your help with this!!

      Jason
      Computer are like air conditioners: they stop working when you open windows!<br /><br />Linux : Because you wouldnt put a Porsche&#39;s engine in a Pinto<br /><br />case : HAF 932<br />mother board: ASUS p5e3<br />processor: Intel e8500 3.16 GHz<br />RAM: 8 GB Corsair DDR3 1600<br />power supply: Corsair 850W<br />video card: GeForce 8400

      Comment


        #4
        Re: sudo: /etc/sudoers is mode 0777, should be 0440

        When you get the recovery mode menu (after you boot it), you need to choose "drop to root prompt". The prompt should be a "#". I think you ended up with your user prompt, which is a "$" and would not let you run the chmod command on a system file.

        Comment


          #5
          Re: sudo: /etc/sudoers is mode 0777, should be 0440

          sudo: /etc/sudoers.d/README is mode 0777, should be 0440
          OK. then repeat the above procedure -- boot into recovery mode, and

          chmod -R 0440 /etc/sudoers.d


          While still in the recovery mode

          cat /etc/sudoers.d/README

          Unless you have intentionally done something to that file, there should be nothing there except commented lines (meaning, lines starting with a #).
          We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

          Comment


            #6
            Re: sudo: /etc/sudoers is mode 0777, should be 0440

            I just ran it again this time I selected:
            root Drop to root shell prompt
            after that I see:
            root@Jason-PC:~# chmod 440 /etc/sudoers
            when i hit return it takes me to the next line like it took the command, then I type reboot and it restarts the computer when I select:
            Ubuntu with Linux 2.6.32-33 Generic
            and again I can not update when I try i get that same error
            Computer are like air conditioners: they stop working when you open windows!<br /><br />Linux : Because you wouldnt put a Porsche&#39;s engine in a Pinto<br /><br />case : HAF 932<br />mother board: ASUS p5e3<br />processor: Intel e8500 3.16 GHz<br />RAM: 8 GB Corsair DDR3 1600<br />power supply: Corsair 850W<br />video card: GeForce 8400

            Comment


              #7
              Re: sudo: /etc/sudoers is mode 0777, should be 0440

              You need to do the command on /etc/sudoers.d

              That's not the same thing as /etc/sudoers

              chmod -R 0440 /etc/sudoers.d
              We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

              Comment


                #8
                Re: sudo: /etc/sudoers is mode 0777, should be 0440

                Originally posted by doctordruidphd
                sudo: /etc/sudoers.d/README is mode 0777, should be 0440
                OK. then repeat the above procedure -- boot into recovery mode, and

                chmod -R 0440 /etc/sudoers.d


                While still in the recovery mode

                cat /etc/sudoers.d/README

                Unless you have intentionally done something to that file, there should be nothing there except commented lines (meaning, lines starting with a #).
                I just ran this and all lines do have the # in front. Now when I run an update I get "sudo apt-get update"
                sudo: can't open /etc/sudoers.d?README: Permission denied
                Computer are like air conditioners: they stop working when you open windows!<br /><br />Linux : Because you wouldnt put a Porsche&#39;s engine in a Pinto<br /><br />case : HAF 932<br />mother board: ASUS p5e3<br />processor: Intel e8500 3.16 GHz<br />RAM: 8 GB Corsair DDR3 1600<br />power supply: Corsair 850W<br />video card: GeForce 8400

                Comment


                  #9
                  Re: sudo: /etc/sudoers is mode 0777, should be 0440

                  sorry the ? between the .d and README should be a /
                  Computer are like air conditioners: they stop working when you open windows!<br /><br />Linux : Because you wouldnt put a Porsche&#39;s engine in a Pinto<br /><br />case : HAF 932<br />mother board: ASUS p5e3<br />processor: Intel e8500 3.16 GHz<br />RAM: 8 GB Corsair DDR3 1600<br />power supply: Corsair 850W<br />video card: GeForce 8400

                  Comment


                    #10
                    Re: sudo: /etc/sudoers is mode 0777, should be 0440

                    Please post the output of:

                    ls -al /etc/sudoers.d
                    We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

                    Comment


                      #11
                      Re: sudo: /etc/sudoers is mode 0777, should be 0440

                      jason@Jason-PC:~$ sudo apt-get update
                      sudo: can't open /etc/sudoers.d/README: Permission denied
                      jason@Jason-PC:~$ sudo apt-get update
                      sudo: can't open /etc/sudoers.d/README: Permission denied
                      jason@Jason-PC:~$ sudo apt-get upgrade
                      sudo: can't open /etc/sudoers.d/README: Permission denied
                      jason@Jason-PC:~$ ls -al /etc/sudoers.d
                      ls: cannot access /etc/sudoers.d/..: Permission denied
                      ls: cannot access /etc/sudoers.d/README: Permission denied
                      ls: cannot access /etc/sudoers.d/.: Permission denied
                      total 0
                      d ? ? ? ? ? .
                      d ? ? ? ? ? ..
                      - ? ? ? ? ? README
                      jason@Jason-PC:~$

                      Computer are like air conditioners: they stop working when you open windows!<br /><br />Linux : Because you wouldnt put a Porsche&#39;s engine in a Pinto<br /><br />case : HAF 932<br />mother board: ASUS p5e3<br />processor: Intel e8500 3.16 GHz<br />RAM: 8 GB Corsair DDR3 1600<br />power supply: Corsair 850W<br />video card: GeForce 8400

                      Comment


                        #12
                        Re: sudo: /etc/sudoers is mode 0777, should be 0440

                        Yeah, OK, my mistake.

                        boot again into recovery

                        chmod -R a+rx /etc/sudoers.d
                        chmod -R u+w /etc/sudoers.d
                        chmod 0440 /etc/sudoers.d/README


                        That should fix it. Sorry about that.
                        We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

                        Comment


                          #13
                          Re: sudo: /etc/sudoers is mode 0777, should be 0440

                          Originally posted by doctordruidphd
                          Yeah, OK, my mistake.

                          boot again into recovery

                          chmod -R a+rx /etc/sudoers.d
                          chmod -R u+w /etc/sudoers.d
                          chmod 0440 /etc/sudoers.d/README


                          That should fix it. Sorry about that.
                          Nothing for you to be sorry about I am VERY THANKFUL for all your help! You and dibl (who has helped me a few times before)...
                          This is why I am so fascinated with Linux, the help from people like you make this GREAT! I am trying this now and I will post the results shortly

                          Thanks!
                          Computer are like air conditioners: they stop working when you open windows!<br /><br />Linux : Because you wouldnt put a Porsche&#39;s engine in a Pinto<br /><br />case : HAF 932<br />mother board: ASUS p5e3<br />processor: Intel e8500 3.16 GHz<br />RAM: 8 GB Corsair DDR3 1600<br />power supply: Corsair 850W<br />video card: GeForce 8400

                          Comment


                            #14
                            SOLVED Re: sudo: /etc/sudoers is mode 0777, should be 0440

                            AWESOME! I just updated:-) Thanks so much for your patients with me and my lack of knowledge with Linux. I think for now I will move my FTP Server back to the win 7 Ultimate PC. My plan was to rid myself of that and install centOS on it after I was sure I could set it up on Linux. I know it will be different but I could take my time if I had this box running my ftp server.

                            Again thanks for all your help, you really are FIRST CLASS!!!
                            Computer are like air conditioners: they stop working when you open windows!<br /><br />Linux : Because you wouldnt put a Porsche&#39;s engine in a Pinto<br /><br />case : HAF 932<br />mother board: ASUS p5e3<br />processor: Intel e8500 3.16 GHz<br />RAM: 8 GB Corsair DDR3 1600<br />power supply: Corsair 850W<br />video card: GeForce 8400

                            Comment


                              #15
                              Re: sudo: /etc/sudoers is mode 0777, should be 0440

                              Glad you got it working.

                              If you are running an ftp server, you probably DO want to move it to linux of one kind or another, if only for security reasons. Sometimes setting up servers on linux can be trying. The devil is in the details -- you might try searching the ubuntu forums for a howto on setting one up. But in the end, for the speed and security, probably worth it. But as I said, it will take some fiddling and searching.

                              We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

                              Comment

                              Working...
                              X