Sudo help please.

Discussion in 'macOS' started by Chris230291, Jul 14, 2012.

  1. Chris230291 macrumors member

    Joined:
    Feb 22, 2011
    #1
    Hello. Could someone please explain how i set this sudo password? Im trying to run an app that asks me... "myHack requires root permissions via sudo to perform the installation. Please enter your password." So i enter my login password and get... "Invalid password." ... "sudo: can't open /private/etc/sudoers: Permission denied sudo: no valid sudoers sources found, quitting"

    Whats going on here and how do i fix it?

    I have already gone into System prefs/Users and groups/login options/network account server/open directory utility/edit/enable root user. This doesn't seem to have worked though. Thats even if it's related?

    Any help is much appreciated!
    Thanks,
    Chris.
     
  2. larkost macrumors 6502a

    Joined:
    Oct 13, 2007
    #2
    There was no reason to enable the root user, and that is orthogonal to sudo working. I am a profesional sysadmin and have not needed to enable the root user on any computer I have worked on in probably 10 years. If I have not needed it, the chances that you need it are pretty much 0.

    To me the error messgage should have at least given you some avenues to try, but maybe that is my experince altering my perceptions. But it looks to me like something has messed-up/removed the /private/etc/sudoers file. Without a working version of that the 'sudo' program is not going to be able to do its job. A quick way to possibly verify this is to:
    Code:
    ls -l /private/etc/sudoers
    That should give you something like:
    Code:
    -r--r-----  1 root  wheel  1272 Sep 19  2010 /etc/sudoers
    If it gives you an error, then someone has erased that file, and you are probably goign to have to re-install to fix this (there are other ways, but they are probably not for you).
     

Share This Page