Etc/sudoers Input/output Error
Contents |
sudo doesn't work - when I try it I get:- sudo: can't stat /etc/sudoers: Input/output error sudo: no valid sudoers etc sudoers syntax error near line 1 sources found, quitting Also "System > Administration > Synaptic Package Manager" sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin doesn't work; it apprears to try to load but goes nowhere. If I start "synaptic" from the command /etc/sudoers is world writable line I get a message "Starting without administrative privileges you will not be able to apply any changes" The background is that, with help from this forum, I
/etc/sudoers.d/50_stack_sh: Syntax Error Near Line 1
managed to install Ubuntu 10.04 Alpha 3 as a persistent live image on a 16GB Pendrive partitioned to give 2GB for the OS and 14GB for data. All has been working brilliantly for over a month but suddenly sudo has stopped working! I had not tried to edit the sudoers file or consciously tried to modify root no valid sudoers sources found quitting linux privileges. The last thing I was doing before I noticed the problem was trying to get a printer driver for an old Epson Stylus Color 600 working. I've tried booting from the original Ubuntu 10.04 DvD live distro to try to edit the persistent image, as per
can not post a blank message. Please type your message and try again. Umar_Kagee Level 1 (0 points) Q: When ever i use a "sudo" command, it returns no valid sudoers sources found quitting centos "sudo: can't open /etc/sudoers: Permission denied".... HELP PLEASE While using terminal, any
Sudoers Syntax Nopasswd
commands with sudo returns the statement seen in the heading... I have only a basic idea of whats
Pkexec
happening, so please try and make the solutions simple.. much appreciated MacBook Pro, Mac OS X (10.6.8), While using Terminal Posted on Jul 11, 2012 3:41 AM I have https://ubuntuforums.org/archive/index.php/t-1516112.html this question too Close Q: When ever i use a "sudo" command, it returns "sudo: can't open /etc/sudoers: Permission denied".... HELP PLEASE All replies Helpful answers Previous Page 2 by idaveb, idaveb Jul 11, 2012 7:51 AM in response to Umar_Kagee Level 2 (265 points) Jul 11, 2012 7:51 AM in response to Umar_Kagee Then something is wrong https://discussions.apple.com/thread/4097927?start=15&tstart=0 with your account or password. This may have changed while you were root and will be hard to trace down.You have not said, does not prompt you for a password? Are you using the same one for your account?What do you get when you issue this command?ls -la /private/etc/sudoersYou want to see: -r--r----- 1 root wheel
did sudo vim /etc/sudoers and added the following to it: Cmnd_Alias GEM_INSTALL = /usr/bin/gem install * Cmnd_Alias GEM_UNINSTALL = /usr/bin/gem uninstall * vitaly ALL=NOPASSWD GEM_INSTALL vitaly ALL=NOPASSWD GEM_UNINSTALL The intention was to grant http://astrails.com/blog/2009/9/29/how-to-fix-a-hosed-etc-sudoers-file-on-mac-osx myself permissions to install gems w/o entering password. I know its insecure, but this https://bbs.archlinux.org/viewtopic.php?id=143487 is security-vs-convinience kind of thing and I only intended to leave it there for a couple of hours while I do some heavy gem development. Anyway, experienced unix users might have spotted the syntax error in my sudoers edits. I forgot the : just after the NOPASSWD. But the problem is even more basic then that. no valid I shouldn't have beed editing the file directly. I should have known better. And now I'm paying the price: $ sudo >>> sudoers file: syntax error, line 36 <<< >>> sudoers file: syntax error, line 37 <<< sudo: parse error in /private/etc/sudoers near line 36 $ sudo vim /etc/sudoers >>> sudoers file: syntax error, line 36 <<< >>> sudoers file: syntax error, line 37 <<< sudo: parse error in /private/etc/sudoers near line 36 OOPS! Now the sudoers no valid sudoers file is broken and I can't even fix it since I was using sudo to edit it! Never do that! :) Use the visudo command. it will check the file syntax before 'commiting' it. Now what? I looked at the net and the general consensus is that you need to boot into a single-user mode to fix it. I really really didn't want to do it. I have 4G of RAM and so I'm usually running dozens of programs and its a pain to close and reopen them all after boot. I'm lazy :) Then I thought there might be a better way. First I checked the permissions on the sudoers file: $ ls -l /etc/sudoers -r--r-----+ 1 root wheel 1302 Sep 28 17:20 /etc/sudoers and only 'root' is in the group wheel, so no luck here. I also couldn't 'su root' since my root user doesn't have a password. duh! But then it appeared to me that I might be able to circumvent this protection by leveraging my OS X 'admin' status. After all it ought to count for something :). I opened "/etc" folder in finder (Go -> Go to Folder...), then opened sudoers file properties. Opening the lock there doesn't require to be a roo
09:26:14 arashroshan Member Registered: 2012-06-17 Posts: 31 [SOLVED] Sudo does not accept user password Hello , again !usually i run root commands with sudo , and i enter my current user password and everything works !Today , i updated my Arch linux with :pacman -Syuand my arch upgraded to 3.4.2-2. but when i want to run a command with sudo , i cannot use my current user password ? thankyou Last edited by arashroshan (2012-06-19 11:10:52) Offline #2 2012-06-17 09:46:55 DSpider Member From: Romania Registered: 2009-08-23 Posts: 2,273 Re: [SOLVED] Sudo does not accept user password Did you read the Sudo wiki page?Warning: It is imperative that sudoers be free of syntax errors! Any error makes sudo unusable. Always edit it with visudo to prevent errors.You should place this at the very top:Defaults editor=/usr/bin/nano(by running "sudo EDITOR=nano visudo")Then, each time you want to edit it, just run:$ sudo visudoAfter reading the wiki article, if you still have problems, post your /etc/sudoers file. "How to Succeed with Linux"I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me). Offline #3 2012-06-17 09:50:20 DarkCerberus Member From: /dev/null Registered: 2011-12-31 Posts: 247 Re: [SOLVED] Sudo does not accept user password Try accessing root using "su" and then go into /etc/sudoers and place your username on the computer into the sudoers which is usually under:example ALL=(ALL) ALL or example ALL=(ALL) NOPASSWD: ALL Offline #4 2012-06-17 10:02:07 arashroshan Member Registered: 2012-06-17 Posts: 31 Re: [SOLVED] Sudo does not accept user password thank you for reply but i have read sudo wiki and also sudo was working before updating .by the way su is still working .here is my sudoer file : ## sudoers file.#### This file MUST be edited with the 'visudo' command as root.## Failure to use 'visudo' may result in syntax or file permission errors## that prevent sudo from running.#### See the sudoers man page for the details on how to write a sudoers file.###### Host alias specification#### Groups of machines. These may include host names (optionally with wildcards),## IP addresses, network numbers or netgroups.# Host_Alias WEBSERVERS = www1, www2, www3#### User alias specification#### Groups of users. These may consis