When ever i use a "sudo" command, it returns "sudo: can't open /etc/sudoers: Permission denied".... HELP PLEASE

While using terminal, any commands with sudo returns the statement seen in the heading... I have only a basic idea of whats happening, so please try and make the solutions simple.. much appreciated

Are you being prompted for a password? Are you using the same password you sign in with? Try just entering sudo with:
sudo su -
It will ask you for a password and then give you a stern warning about acting as root, where you can really mess up your computer for good if you are not careful. If it won't change to the root account you have a permission problem or a credentials problem.

Similar Messages

  • Sudo unable to open /etc/sudoers

    Whenever I try to do anything at all with sudo on my fresh x86-64 Arch install, it prints out this error:
    sudo: unable to open /etc/sudoers: Permission denied
    sudo: no valid sudoers sources found, quitting
    sudo: unable to initialize policy plugin
    This is on a fresh Arch install from the core Image CD, packages initially installed from the CD and then upgraded with #pacman -Syu. I can edit sudoers just fine with visudo, and installing outdated versions of sudo produce the same error. File permissions on both /usr/bin/sudo and /etc/sudoers both look as they should be. Also, users and user groups don't seem to be an issue.
    Found this related StackExchange thread and here are the outputs of strace and ltrace if anyone can interpret them: http://unix.stackexchange.com/questions … most-files
    Ltrace:
    # ltrace -u notthemessiah sudo true 2>&1 | egrep '(sudo|stat|set.*[ug].*id)'
    bindtextdomain("sudo", "/usr/share/locale") = "/usr/share/locale"
    textdomain("sudo") = "sudo"
    strlen("sudo") = 4
    memcpy(0x01c6f299, "sudo", 4) = 0x01c6f299
    fopen("/etc/sudo.conf", "r") = 0
    __xstat(1, "/usr/lib/sudoers.so", 0x7fff6b0913d0) = 0
    dlopen("/usr/lib/sudoers.so", 257) = 0x01c6f630
    dlsym(0x01c6f630, "sudoers_policy") = 0x7f33e2f96960
    __xstat(1, "/usr/lib/sudoers.so", 0x7fff6b0913d0) = 0
    dlopen("/usr/lib/sudoers.so", 257) = 0x01c6f630
    dlsym(0x01c6f630, "sudoers_io") = 0x7f33e2f969c0
    fputs("sudo", 0x7f33e35296e0sudo) = 1
    fputs("unable to open /etc/sudoers", 0x7f33e35296e0unable to open /etc/sudoers) = 1
    fputs("sudo", 0x7f33e35296e0sudo) = 1
    fputs("no valid sudoers sources found, "..., 0x7f33e35296e0no valid sudoers sources found, quitting) = 1
    fputs("sudo", 0x7f33e35296e0sudo) = 1
    +++ exited (status 1) +++
    Strace:
    # strace -u notthemessiah sudo true 2>&1 | egrep '(sudo|set.*[ug].*id)'
    execve("/usr/bin/sudo", ["sudo", "true"], [/* 22 vars */]) = 0
    open("/etc/sudo.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat("/usr/lib/sudoers.so", {st_mode=S_IFREG|0755, st_size=185352, ...}) = 0
    open("/usr/lib/sudoers.so", O_RDONLY) = 3
    stat("/usr/lib/sudoers.so", {st_mode=S_IFREG|0755, st_size=185352, ...}) = 0
    open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/sudoers.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/locale/en_US.utf8/LC_MESSAGES/sudoers.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/locale/en_US/LC_MESSAGES/sudoers.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/locale/en.UTF-8/LC_MESSAGES/sudoers.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/locale/en.utf8/LC_MESSAGES/sudoers.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/locale/en/LC_MESSAGES/sudoers.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
    lstat("/etc/sudoers", {st_mode=S_IFREG|0440, st_size=2849, ...}) = 0
    setresgid(4294967295, 0, 4294967295) = 0
    setresuid(0, 1, 4294967295) = 0
    open("/etc/sudoers", O_RDONLY) = -1 EACCES (Permission denied)
    setresuid(4294967295, 0, 4294967295) = 0
    write(2, "sudo", 4sudo) = 4
    write(2, "unable to open /etc/sudoers", 27unable to open /etc/sudoers) = 27
    setresuid(4294967295, 1, 4294967295) = 0
    setresgid(4294967295, 0, 4294967295) = 0
    setresuid(4294967295, 0, 4294967295) = 0
    setresuid(1000, 0, 4294967295) = 0
    setresgid(1000, 1000, 1000) = 0
    write(2, "sudo", 4sudo) = 4
    write(2, "no valid sudoers sources found, "..., 40no valid sudoers sources found, quitting) = 40
    open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/locale/en_US.utf8/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/locale/en_US/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/locale/en.UTF-8/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/locale/en.utf8/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/locale/en/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
    write(2, "sudo", 4sudo) = 4

    No, I used visudoers and everything relating to that correctly. It's just probably something that happened while installing the core packages from the install CD that caused problems. As of now, I just reinstalled Arch on a new partition (this was a fairly fresh install) and it seems to work just fine. I was willing to continue to test the issue, but resizing the partition seems to have corrupted it somehow.

  • Sudo can't open /etc/sysinfo.conf mac os x lion

    I have been trying to get locate to work for ages now (well not really, only since I upgraded to lion).
    And I'm having no joy. I keep getting an su error when /usr/libexec/locate.updatedb is being called.
    Terminal just throws this cool error "su: Sorry".
    Console (syslog) shows this error
    (pam_acct_mgmt: error in service module)
    Which apparently means an error occured in a PAM module
    I decided to run dtrace opensnoop to find out what files were being opened and what was going wrong.
    Mind you that I am not versed in Dtrace, this is one of my first uses.
    This is what I get when I run "sudo /usr/libexec/locate.updatedb" whilst running "sudo opensnoop -x -n sudo -e":
    UID
    PID
    COMM
    FD
    ERR
    PATH
    0
    54853
    sudo
    -1
    2
    /etc/sysinfo.conf
    0
    54854
    sudo
    -1
    2
    /proc/self/fd
    0
    54858
    su
    -1
    2
    /etc/sysinfo.conf
    /etc/sysinfo.conf does not exist on my system.
    This might be the cullprit, but I'm not sure.
    I have been getting the very "helpfull" tip to just use mdfind.
    Not being able to use locate isn't the end of the world for me, it just bugs the **** out of me that it doesn't work anymore.
    I can't shake the feeling that I don't know what else is broken.

    I fixed the issue by doing a clean install of Lion.
    Now locate works as expected.
    Incidentally, when I installed Xcode on my upgraded version of Lion I had the same problem that many other people had which was that the installer window (the one with the progress bar) got stuck at 99% even though Xcode finished installing.
    I did not have this issue with the clean install Lion... hmm go figure.

  • I uploaded music in the match and when i want to play it in my phone, some of the tracks appear blocked (blanked) and a few not. When I'm connected through a wi fi spot, i can play all of the tracks. Help!

    I uploaded music in the match and when i want to play it in my phone, some of the tracks appear blocked (blanked) and a few not. When I'm connected in a wi fi spot, I can play all of the tracks. Help please.

    Hi,
    You need a wifi connection to stream. Previously played tracks appear in a temporary cache which allows them to be played again when yOu have no wifi..
    You can either predownload selected tracks or use cellular data.
    Jim

  • I have an audio problem when ever I use my Firefox web browser that makes a sharp audible sound simiular to a video game gun shot sound effect when ever I go into a new web page?

    I have an audio problem that when ever I use my Firefox web browser it makes a sharp audible sound similar to a video game gun shot sound effect when ever I go into a new web page? I change to a new site or page a page on a site, I get an audible gunshot ping trpe sound? It happens almost every time. Its very annoying and is driving me nuts???
    Any body out there had this happen also or know how to diagnose and fix this type of problem? I would hate to have to delete my whole Firefox program and have to start over again. If that is the case I will probably just scrap it and go on to try Google Chrome instead. I already have GC partially set up. I really have liked Firefox up to this point. I know add ons can cause problems at times but I haven't added anything new lately and this just started happening?

    Hi,
    Please check if this happens in [https://support.mozilla.com/en-US/kb/Safe%20Mode Safe Mode].
    [http://kb.mozillazine.org/Problematic_extensions Problematic Extensions]
    [https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes Troubleshooting Extensions and Themes]
    [http://support.mozilla.com/en-US/kb/Uninstalling+add-ons Uninstalling Add-ons]
    [http://kb.mozillazine.org/Uninstalling_toolbars Uninstalling Toolbars]
    Safe mode disables the installed '''Extensions''', and themes ('''Appearance''') in '''Tools''' ('''Alt''' + '''T''') > '''Add-ons'''. Hardware acceleration is also temporarily disabled - the manual setting is '''Tools''' > '''Options''' > '''Advanced''' > '''General''' > '''Use hardware acceleration when available'''. [https://support.mozilla.org/en-US/kb/Options%20window%20-%20Advanced%20panel?as=u Options > Advanced]. All these settings/add-ons can also be individually or collectively disabled/enabled/changed in Firefox normal mode to check if an extension, theme or hardware acceleration is causing issues.
    [https://support.mozilla.org/en-US/kb/Options%20window Options]

  • When ever I use Adobe reader 11 with a USB device, I cannot safe remove the USB device and get the following message (or similar one) in system log:  The application \Device\HarddiskVolume1\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe with pr

    When ever I use Adobe reader 11 with a USB device, I cannot safe remove the USB device and get the following message (or similar one) in system log:  The application \Device\HarddiskVolume1\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe with process id 6620 stopped the removal or ejection for the device USB\VID_05DC&PID_C75C\20131215015821328FC8.
    I am running on Windows Server 2012 R2 in Desktop Experience mode.
    Any ideas?
    Roger

    In addition to that symptom, I discovered that even though I had closed all Adobe Reader sessions, the processes kept running and used up 90%+ of my CPU.

  • I am not able to update my iphone 4 ,when ever i tried to update it its show 1309 error...and at times 9006 error ,please help me ..

    i am not able to update my iphone 4 ,when ever i tried to update it its show 1309 error...and at times 9006 error ,please help me ..

    Hey alkarim2008,
    If you are having an issue with being unable to update or restore your iPhone, I would suggest that you troubleshoot using the steps in this article - 
    Resolve iOS update and restore errors in iTunes - Apple Support
    Thanks for using Apple Support Communities.
    Happy computing,
    Brett L 

  • My macbook won't start up i have used the option command p r while holding down power button but not done.. please help guys

    my macbook won't start up i have used the option command p r while holding down power button but not done.. please help guys

    It not polite to repost asking fro more help three minutes after initial post.
    Recovery mode is Command & R keys after depressing and releasing the Power button  for a normal startup.
    OS X: About OS X Recovery - Apple Support
    That only works for Lion and later.
    What exactly happens when your try to boot to Recovery?
    Try starting in Safe Mode resetting the SMC and NVRAM/PRAM
    OS X: What is Safe Boot, Safe Mode?
    Intel-based Macs: Resetting the System Management Controller (SMC)
    About NVRAM and PRAM
    What model MacBook Pro and what OSX version was on the Mac?
    Have you tried booting from an OSX install DVD?
    When you try to start doe the Power light light?
    This is the Mac Pro desktop forum. I requested your post be moved to the MacBook Pro laptop forum.

  • Suddenly with version 9 and 10 i cant use the shortcut command of ctrl+shift+t to open the most recently closed tab.

    Suddenly with version 9 and 10 i cant use the shortcut command of ctrl+shift+t to open the most recently closed tab. a feature used several times a day, previously. This is very Frustrating to me, i have tried looking up a tool keyconfig 20110522 and looked that it says that ctrl+shift+t is the right command, but i still cant use it WHY oh WHY?? if i could get some help figuring this out it would be so awesome, cause i love Firefox, been using it almost daily for the last 10 or so years and i don't intend to switch soon.

    Hi,
    Please check if this happens in [https://support.mozilla.com/en-US/kb/Safe%20Mode Safe Mode.] This is a temporary diagnostic session and you can exit anytime and start Firefox normally again. This session disables all the '''Extensions''', themes ('''Appearance''') and '''Plugins''' in '''Tools''' ('''Alt''' + '''T''') > '''Add-ons'''.
    [http://kb.mozillazine.org/Problematic_extensions Problematic Extensions]
    [https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes Troubleshooting Extensions and Themes]
    [http://support.mozilla.com/en-US/kb/Uninstalling+add-ons Uninstalling Add-ons]
    [http://kb.mozillazine.org/Uninstalling_toolbars Uninstalling Toolbars]

  • Sudo: unable to stat /etc/sudoers: No such file or directory sudo: no valid sudoers sources found, quitting

    I am trying to empty my trash but it wouldn't . so I ran this command sudo rm -rf ~/.Trash/* in the terminal
    I got an error message
    "sudo: unable to stat /etc/sudoers: No such file or directory
    sudo: no valid sudoers sources found, quitting"
    does anyone have a clue? thanks

    First, never use the shell (Terminal) to empty the Trash. It's dangerous and unnecessary, and it usually doesn't work.
    A necessary system file is missing. If you know how that happened, restore it from a backup. Otherwise, see below.
    If you don't already have a current backup, back up all data, then reinstall the OS.* You don't need to erase the startup volume, and you won't need the backup unless something goes wrong. If the system was upgraded from an older version of OS X, you may need the Apple ID and password you used.
    If you use FileVault 2, then before running the Installer you must launch Disk Utility and select the icon of the FileVault startup volume ("Macintosh HD," unless you gave it a different name.) It will be nested below another icon with the same name. Click the Unlock button in the toolbar and enter your login password when prompted. Then quit Disk Utility to be returned to the main Recovery screen.
    There are ways to back up a computer that isn't fully functional. Ask if you need guidance.
    If you installed the Java runtime distributed by Apple and still need it, you'll have to reinstall it. The same goes for Xcode. All other data will be preserved.
    *The linked support article refers to OS X 10.10 ("Yosemite"), but the procedure is the same for OS X 10.7 ("Lion") and later.

  • Help!! I just updated my iPad 2 into IOS 5.1.1.. When it finished updating, I can't open all of my games. Please help me fix this. :( thank you.

    Help!! I just updated my iPad 2 into IOS 5.1.1.. When it finished updating, I can't open all of my games. Please help me fix this. :( thank you.

    You are most welcome

  • I just got a notice to update my firefox to 4.0 and when I downloaded the new software it indicated: that I can't open the application "Firefox" because it is not supported on this architecture. Any ideas about what might be wrong and how to fix it?

    I just got a notice to update my firefox to 4.0 and when I downloaded the new software it indicated: that I can't open the application "Firefox" because it is not supported on this architecture. Any ideas about what might be wrong and how to fix it?

    Firefox 4 requires at least OS X 10.5 and an Intel Mac. There is a third party version of Firefox 4 that runs on OS X 10.4/10.5 and PPC Macs, for details see http://www.floodgap.com/software/tenfourfox
    If you prefer, you can get the latest version of Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html

  • HT4623 when i update my iphone 5 i receive error -1  my iphone 5 can not open it is on recovery mod please help me

    when i update my iphone 5 i receive error -1  my iphone 5 can not open it is on recovery mod please help me

    Error 1 or -1 indicates a serious hardware issue.
    Take the device to Apple or whomever provides hardware support in your country for evaluation and likely replacement.

  • I-photo. When I click to go full screen  it goes fuzzy. Doesnt happen in film show. Help Please!

    I photo . When trying to go to full screen it goes fuzzy, Does not happen in film show. Help Please!

    Thanks for your help.I  have about  3,500 photos in I-photo. None will expand to full screen with out going fuzzy.I also have 400 in Kodac easy share and  these are not affected.
    About the same time that this happened the icons in the dock lost some of their colour and the system preferences vanished. We managed to reinstate this. Any ideas?
    Thanks Ron

  • HT5787 i buy iphone 4sfrom some friend that's he got it from his friend in canada and me set up software for it from Itunes and it asking now for apple ID that's i don't used it for download apps and me can't open my Iphone right now !! what i should do ?

    i buy iphone 4sfrom some friend that's he got it from his friend in canada and me set up software for it from Itunes and it asking now for apple ID that's i don't used it for download apps and me can't open my Iphone right now !! what i should do ?

    It's not stolen ,that iphone came from canada to Egypt and me activeted it last night i got the acc from the owner
    Thanks for Replay Mr

Maybe you are looking for