Using sudo gives "/etc/sudoers is mode 0640, should be 0440" error...

I tried to edit the sudoers file and must have done something wrong. Every time I try to use the sudo command I get the following two errors:
sudo: /etc/sudoers is mode 0640, should be 0440
and
Segmentation fault
I'm a new user. Any ideas on how I can get things fixed up again so that I can use sudo again?
Thanks in advance.

Solved the issue by running the *Disk Utility* and running the *Repair Permissions* command.

Similar Messages

  • Error with command "sudo: /etc/sudoers is mode 0777, should be 0440 Segmentation fault"

    I don't know what to do... I installed XAMPP for Mac and then Joomla, I had some problems and I changed the permissions to some folders, so everything was working well, later I turned off my MacBook and when turned on some parts of Joomla was not working (http://localhost/administrator) neither MySQL Server (http://localhost/phpmyadmin), so I entered to a console and I tried to change the permissions again but when I try to be superuser I can't, the error that means is:
    sudo: /etc/sudoers is mode 0777, should be 0440 Segmentation fault
    Sorry, I don't speak english, I tried to explain my error the better i could.

    What is an SO disk? Do you mean your install disks? If so, don't use them. Run Disk Utility from your hard drive. The only time you should run Disk Utility from an install disk is when you need to repair the filesystem. When running Repair Permissions, it should be run from your hard drive so that the permissions it fixes correspond with your updated OS version.

  • Problem with sudo - sudoers is mode 0604, should be 0440

    ryans-imac-2:~ Ryan$ sudo chmod -RN /.vol
    sudo: /private/etc/sudoers is mode 0604, should be 0440
    ryans-imac-2:~ Ryan$ postdrop: warning: unable to look up public/pickup: No such file or directory
    Please advise.

    There is a '-N' option for chmod -- it's for removing ACL's.
    The best way to learn is not to make random changes that you don't understand, and then ask for help in public forums when something goes wrong. Set yourself a constructive problem to solve; for instance, by writing a shell script. Read man pages. Read UNIX books.
    You say you want to grant permissions to the current user. Which permissions -- read, write, execute, all? Do you mean ownership? ACL's? Recursive? Sticky or SUID bits? What permissions should other users have? First learn how to ask the right question, then you'll most likely be able to answer it yourself. Start with the chmod(1) man page. When you understand everything on that page, you'll know quite a lot.
    Meanwhile you might be able to repair the damage you'be already done by running the "Repair permissions" routine from Disk Utility. This would be one of the few situations where it's actually useful.

  • Mode 0660, should be 0440 error

    trying to run sudo -s
    getting error "sudo: /etc/sudoers is mode 0660, should be 0440"
    root is enabled on this Snow Leopard Macbook Pro
    try to change it by issueing:
    sudo chmod 440 /etc/sudoers
    gets the same error
    I only want to fix this error, not dissect why Im doing this or that, if you dont know the cause and resolution, please dont reply

    If 'root' is really enabled, and you know the root password, then just use the command:
    su
    Password ...enter root password here...
    chmod 440 /etc/sudoers
    You could try Disk Utility Repair Permissions. Maybe that would fix the sudoers file (I do not know if it will, but it is worth a try). If Disk Utility will not run because it too needs a working sudoers file, then boot from the installation DVD and run Disk Utility from there.
    Failing that you could boot your Mac holding the 'T' key so you get into "Target" mode, and using firewire cable, mount your Mac on another Mac and use the other Mac to fix the /Volumes/yourMacsMountName/etc/sudoers file permission.
    Next would be booting into single user mode, and I think then using "mount -u" to get your boot disk writable, and then applying the "chmod 440".
    And in the future use the "visudo" command to make any /etc/sudoers file modifications (see man sudoers).

  • Borked sudo, /private/etc/sudoers zero length

    Okay, so I borked /private/etc/sudoers. Could someone post the contents of this file so that I can get this to work again.
    Thanks.

    Welcome to Apple Discussions!!
    Okay, so I borked /private/etc/sudoers.I assume it is the same on an Intel machine (can't think why not):
    <pre>[ibook:/etc] root# ls -l sudoers
    -r--r----- 1 root wheel 341 Sep 13 2003 sudoers
    [ibook:/etc] root# more sudoers
    # sudoers file.
    # This file MUST be edited with the 'visudo' command as root.
    # See the sudoers man page for the details on how to write a sudoers file.
    # Host alias specification
    # User alias specification
    # Cmnd alias specification
    # Defaults specification
    # User privilege specification
    root ALL=(ALL) ALL
    %admin ALL=(ALL) ALL
    [ibook:/etc] root#</pre>

  • 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.

  • [SOLVED] Unable to use SUDO: issues with /etc/sudoers

    I have reinstalled Arch_64 and I have run into some problems with SUDO.
    I get the following errors when I try to use sudo:
    sudo : unable to stat /etc/sudoers : Permission Denied
    sudo : no valid sudoers sources found, quitting
    sudo : unable to initialize policy plugin
    Here's what I have done with it so far:
    * I added USERNAME (myself) to the 'wheel' group
    * I uncommented %wheel ALL=(ALL) All using visudo
    As it was not working for me I also:
    * # chown -c root:root /etc/sudoers
    * # chmod -c 0440 /etc/sudoers
    * Since that too did not work, I recommented %wheel and added USERNAME ALL=(ALL) ALL just under the line root ALL=(ALL) ALL and repeated the above steps. The above problem persists.
    * I checked with visudo -c and it says "/etc/sudoers parsed ok".
    I have been through the WIKI and the forums but still unable to figure out whats going wrong.
    I will appreciate if the forum can guide me to solution and help me resolve this issue.
    Thanks.
    Last edited by fantab (2012-11-20 09:00:56)

    Had exactly the same problem with a new Arch_64 install a few months ago, which turned out to be a problem with permissions on / (which i changed with chmod) - can't remember the details, but it was this post that put me on to a solution:
    http://archlinuxarm.org/forum/viewtopic … =20#p19727

  • 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.

  • How do i fix this sudo: /opt/local/etc/sudoers is owned by uid 501, should be 0

    sudo is broken

    With the following commands from Single User mode:
    mount -uw /
    chown root /opt/local/etc/sudoers
    or from the DVD:
    chown root /Volumes/Macintosh\ HD/opt/local/etc/sudoers
    assuming Macintosh HD is the drive's name.
    (58851)

  • In the context of restoring a drive from a backup, i copied /etc/sudoers from my backup. Now it does not work due to the permissions not being correct (even though it was copied via sudo cp -rp)

    In the context of restoring a drive from a backup, i copied /etc/sudoers from my backup. Now it does not work due to the permissions not being correct (even though it was copied via sudo cp -rp)

    Most likely you have Office 2004 which are PPC-only applications and will not work in Lion. Upgrade to Office 2011. Other alternatives are:
    Apple's iWork suite (Pages, Numbers, and Keynote.)
    Open Office (Office 2007-like suite compatible with OS X.)
    NeoOffice (similar to Open Office.)
    LibreOffice (a new direction for the Open Office suite.)

  • Is anyone using a 1252 ap in bridge mode with channel bonding?

    Is anyone using a 1252 ap in bridge mode, with channel bonding?
    I had a question a while ago from a customer with regards to bridging with a 1252 ap to increase throughput for a wireless link he was using, from the throughput improvements in 802.11n. At the time I spoke to Cisco Pre-Sales, and they indicated that the bridge function in the 1252 exists for 'testing' purposes. I advised our customer that although it should be possible to implement, we may run into difficulties with TAC support ect. in the event of problems with the link.
    Can anyone comment if this is a Cisco validated/approved design now?
    Also, has anyone done this and tested the throughput achievable?
    Has anyone bridged both 2.4Ghz and 5Ghz radios on a 1252?
    The reason I ask is I've seen a note about a Cisco 5Ghz 802.11n bridge being launched.
    Thanks in advance.
    Alex.

    Hi All,
    Thanks for all the feedback; I have finally done some throughput testing with the 1252's. Please note, this is very rough, just to give an idea on throughput that's achievable, and what you can enable. Did this a few weeks back, and have now wiped the cnf, so dont have the show runs any more....
    The two devices were set up a few feet apart, with the standard 2dBi and 3dBi antenna.
    All tests done on the 5GHz radio with Autonomous AP IOS.
    I did data transfers via a laptop either end of the link; transferring data using the Test TCP utility (wasn't going for scientific tests, just getting some idea of throughput).
    802.11a @ 54mbs (20Mhz chan) WGB - root to non root = 2.43 - 2.5MB/Sec = 19.44 - 20 Mbps
    802.11a @ 54mbs (20Mhz chan) WGB non root to root = 2.42 - 2.44MB/Sec = 19.44 - 20 Mbps
    802.11n @ 'n' rates( 20Mhz chan) WGB root to non root = 6.18 - 6.33MB/Sec = 49.44 - 50.64 Mbps
    802.11n @ 'n' rates ( 20Mhz chan) WGB non root to root = 4.77 - 5.00MB/Sec = 38.16 - 40 Mbps
    802.11n @ 'n' rates ( 40Mhz chan) WGB root to non root = 8.59 - 8.58MB/Sec = 68.64 - 68.64 Mbps
    802.11n @ 'n' rates ( 40Mhz chan) WGB non root to root = 6.35 - 7.20MB/Sec = 50.8 - 57.6 Mbps
    802.11n @ 'n' rates ( 40Mhz chan) Bridge root to non root = 9.73 - 10MB/Sec = 77.84 - 80 Mbps
    802.11n @ 'n' rates ( 40Mhz chan) Bridge non root to root = 8.40 - 8.57MB/Sec = 67.2 - 68.56 Mbps
    So basically, as per the above posts, you can implement bridging on the 1252's and utilise the 802.11n rates and features, SGI, Spatial Streams and Channel Bonding etc, to achieve higher throughput.
    Also, as per the above posts, this is still not supported by Cisco, so, in my case, I'd be highlighting that to customers straight off, but don't see it as too much of an impediment to deploy, as long as the customer weighs up the risks.
    On a side note, I attended a Cisco session recently, and was told that the 802.11n Bridge, (the 1430?) was on hold indefinitely. My feeling is that this makes it more pressing that Cisco introduces support for bridging on the 1252.
    Get in the ear of your local Wireless SE's, the more they hear it, the more they'll moan to the Wireless BU in San Jose! ;-)
    Bridging with 802.11n has some interesting possibilities, I worked with Alvarion 5GHz bridges 6 or 7 years ago, that could do 'near LOS' - Worked well in cities, using reflection of the RF from buildings. I had never heard of 802.11n back then, but I'm guessing Alvarion was using MIMO to achieve good non-LOS connectivity in the 5GHz band.
    Cheers,
    Alex.

  • [SOLVED] Run X11 apps using sudo while following wiki

    i was going through the wiki
    https://wiki.archlinux.org/index.php/Su … using_sudo
    added the line.
    Defaults env_keep += "HOME"
    [rho@turion ~]$ sudo visudo
    visudo: >>> /etc/sudoers: syntax error near line 94 <<<
    What now?
    Options are:
    (e)dit sudoers file again
    e(x)it without saving changes to sudoers file
    (Q)uit and save changes to sudoers file (DANGER!)
    What now? Q
    [rho@turion ~]$ sudo
    sudo: >>> /etc/sudoers: syntax error near line 94 <<<
    sudo: parse error in /etc/sudoers near line 94
    sudo: no valid sudoers sources found, quitting
    sudo: unable to initialize policy plugin
    Last edited by rhoit (2012-11-16 11:59:50)

    rhoit wrote:
    $ pacman -Ss hdparm
    $
    can't find!
    That could be a problem, given that hdparm is in core ...
    Anyways, man page: http://linux.die.net/man/8/hdparm
    (This all is pretty off-topic to the original thread; sorry moderators.  I was merely using it as a rather blatant example of the "Warn the user but do what it is told to do" idea)

  • Question about an entry in /etc/sudoers

    I have the following entry in my /etc/sudoers:
    user ALL=(ALL) ALL
    Now I am not sure what that actually does. Could you explain it to me?

    I'm guessing "user" is your username.  That allows you to use sudo with any command.  It is possible to set finer restrictions for some users.

  • /etc/sudoers, users accounts' permissions

    Hello everyone,
    I'm using a standard account for my daily use operations and an administrator account to manage my PC since I started using Mac OS X because this was my standard configuration with Windows, GNU/Linux and *BSD OSs.
    On the other hand I've a little problem tring to use 'sudo' command, I can't use it when I'm logged on with filippo (the non-admin accout) and to use 'sudo' command I've to digit:
    $su amministratore
    $sudo <command>
    it's boring, so I decided to modify /etc/sudoers file.
    NB: amministratore is the only one admin account on my PC.
    I've added this line in the configuration file:
    filippo ALL=(ALL) PASSWD: ALL
    I can now execute every command using:
    $sudo <command>
    directly from filippo account, but there are some drawbacks, I need to insert no password although I've put PASSWD option (and this isn't a good idea).
    How can I modify /etc/sudoers to permit filippo using directly:
    $sudo <commnad>
    and inserting amministratore's password?
    Filippo
    PS: sorry for my little English but I don't use it so much.
    MacBook (Black)   Mac OS X (10.4)   Core 2 Duo T7200 (2.00 GHz, 4 MB L2) - 1 GB DDR2-667 - 120 GB

    I have wondered if this was possible as well - to have a password separate from the login password to use 'sudo'. The closest I could find was the 'rootpw' option, where 'sudo' prompts for the "root" password instead of the user's password. Unfortunately, this option only works if the "root" account is enabled, which of course isn't recommended.
    Even less recommended, setting 'runas_default' and 'runaspw' in '/etc/sudoers' where the 'runas_default' user is a clone of "root" also seems to work, but it is difficult to predict how various services will interpret that user (eg. many are set to block "root" login by default, but will they block the clone by default?). Doing this without further testing may well leave some glaring security hole open.
    Actually the main reason I'm posting is to make sure people are aware that using 'sudo' (invoking "root" privileges) or even just 'su adminuser' (invoking "admin" privileges) from a non-admin account unlocks secure pref panes (except "Accounts") and the "Finder" ("Get Info"), effectively giving the GUI user "root" access to files via "Finder" (this is apparently a feature). As far as I know, there is no way to revoke this right (well, there is, but there is sort of a catch-22), except to wait for five minutes for the rights to time out. Unless you can be confident that you will always remember to remain with your computer for five minutes after using 'sudo' or 'su adminuser', it would be recommended that users log in to an "admin" account whenever performing administrative tasks if you are in a setting where other users have access to your computer.

  • When Deploying SharePoint 2010 solution using Powershell gives me nothing

    When Deploying SharePoint 2010 solution using Powershell gives me nothing
    And when go to Central Admin >> System Settings >> Farm Management >> Manage Farm Solution
    I found my Solution Status is Deploying and still deploying and nothing.

    Hi,
    According to your description, my understanding is when you deploy the SharePoint solution, the deploy status stuck on the deploying status.
    To resolve this issue, I suggest you can do as the followings:
    1. On any server, start, run, services.msc, enter, this will open the services console.
    2. Now type s, this will give you all the services that start with S, look for SharePoint timer service and make sure it’s in started mode.
    3. This service should be started on all the front ends as well as application server.
    More information:
    Solution deployment stuck on deploying: SharePoint 2010
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

Maybe you are looking for

  • How to make iSight work with windows vista on boot camp

    I just installed window vista on my mac, everything work perfect but the the cam, i got a MacBook pro and my boot camp is 2.0 Please advise, thanks

  • SAP-PRICING FOR FREE GOODS

    Hi all, I have a issue in AFS free goods, Order raised for 10 materials so he should get 10 materials free But this is not possible in AFS as it does not support free goods concept Second material is free of cost. Once first material is entered in th

  • If I upload to iCloud all my pictures....?how can I download them to another device?  (From iPhone to iPad mini)

    I am backing up all my pictures (from a long trip to Italy) to the iCloud from iPhone......I want to download the onto my iPad before I leave space on my iPhone. How do I download them from the cloud??? You have to talk to me like If I am a second gr

  • Hub Manager - what is MAIN?

    We have recently used the home hub manager to restrict access to an over zealous teenager.  We have just blocked everything we know is his plus half a dozen things that just have a code but which seem to be his PS3, PSP etc.   There is one item on th

  • Move OEM central repository to a new database

    Hi, We want to move the OEM central repository to a different machine, we would like to migrate the data from original database to the new database. What's the best way to do that and how to re-configure OMS to use the new database? Thanks!