LINUX LITE 7.2 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help sudoers file
#1
Hi jerry or anybody else


I need some help please  :'(

I messerd with something in /etc/sudoers in terminal and deleted the # in root and ALL ALL ALL. I shouldn't have and asked first  :'( :'( :'(

I get this now

Code:
>>> /etc/sudoers: syntax error near line 19 <<<
>>> /etc/sudoers: syntax error near line 25 <<<
sudo: parse error in /etc/sudoers near line 19
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin


I was trying to go into SU in terminal but it was saying this su: Authentication failure

was trying to update grub with this but you have to be in root mode

Code:
grub-mkconfig -o /boot/grub/grub.cfg

Can you help me fix this please

Thank you

I love my chicken and my popcorn and movies like i like Linux
Reply
#2
My stock /etc/sudoers file below.

Code:
harry@misohorny1:~$ sudo -i
[sudo] password for harry:
root@misohorny1:~# cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults    env_reset
Defaults    mail_badpass
Defaults    secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo    ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

You can make a new one and fix yours by replacing it with mine. Just more info below

Code:
root@misohorny1:~# cd /etc/sudoers.d
root@misohorny1:/etc/sudoers.d# ls
README
root@misohorny1:/etc/sudoers.d# cat README
#
# As of Debian version 1.7.2p1-1, the default /etc/sudoers file created on
# installation of the package now includes the directive:
#
#     #includedir /etc/sudoers.d
#
# This will cause sudo to read and parse any files in the /etc/sudoers.d
# directory that do not end in '~' or contain a '.' character.
#
# Note that there must be at least one file in the sudoers.d directory (this
# one will do), and all files in this directory should be mode 0440.
#
# Note also, that because sudoers contents can vary widely, no attempt is
# made to add this directive to existing sudoers files on upgrade.  Feel free
# to add the above directive to the end of your /etc/sudoers file to enable
# this functionality for existing installations if you wish!
#
# Finally, please note that using the visudo command is the recommended way
# to update sudoers content, since it protects against many failure modes.
# See the man page for visudo for more information.
#
root@misohorny1:/etc/sudoers.d#
LL 3.6,2.8
Dell XT2 > Touchscreen Laptop
Dell 755 > Desktop
Acer 150 > Desktop
I am who I am. Your approval is not needed.
Reply
#3
How do i do this  Sad
I love my chicken and my popcorn and movies like i like Linux
Reply
#4
Waiting........ Sad
I love my chicken and my popcorn and movies like i like Linux
Reply
#5
Hi,

The forum is really, really good, the best in my opinion.
It relies on the goodwill and knowledge of folks on here.
You may have to wait a little for the right person to come along...
Upgrades WIP 2.6 to 2.8 - (6 X 2.6 to 2.8 completed on: 20/02/16 All O.K )
Linux Lite 3.0 Humming on a ASRock N3070 Mobo ~ btrfs RAID 10 Install on 4 Disks Smile

Computers Early days:
ZX Spectrum(1982) , HP-150 MS-DOS(1983) , Amstrad CPC464(1984) ,  BBC Micro B+64(1985) , My First PC HP-Vectra(1987)
Reply
#6
OK thank you Wirezfree. Thats what i will be doing  ;D
I love my chicken and my popcorn and movies like i like Linux
Reply
#7
Carefully enter this command:

Code:
pkexec visudo

Enter your password, and your editor will open with the sudoers file. You can now do one of many things, use the default example posted above, or share the offending lines in the error message you had with us to figure out for you.


That aside, why do you need to touch grub? Show caution with that command.

Do not ever use any other means to modify sudoers, outside of the normal visudo command. It will notify you of errors before saving it, and even offer prompt to edit the file again.
The Truth is out there.
Be sure to check the Manual out and always report Bugs or feature requests.
[Image: psCXIcR.png]
Reply
#8
(02-17-2016, 08:45 PM)shaggytwodope link Wrote:Carefully enter this command:

Code:
pkexec visudo

Enter your password, and your editor will open with the sudoers file. You can now do one of many things, use the default example posted above, or share the offending lines in the error message you had with us to figure out for you.


That aside, why do you need to touch grub? Show caution with that command.

Do not ever use any other means to modify sudoers, outside of the normal visudo command. It will notify you of errors before saving it, and even offer prompt to edit the file again.

use the default example posted above, or share the offending lines in the error message you had with us to figure out for you.

I did share them above.

How do i use that example. It has hes username in it. So what do i do and how do i do this?


I was trying to go into SU root. But it said su: Authentication failure. And i was typing my password correctly. SO thats not an issue



I love my chicken and my popcorn and movies like i like Linux
Reply
#9
Understand this, the output of your original post means nothing to me. As I can not see any modifications you've made. Now if you use the command I posted and copy the lines mentioned in your original post and share them... (line 19 and 25) we can FIX them for you. Otherwise you can simply use the default shared.


With no modifcations this is the default sudoers file:
Code:
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults    env_reset
Defaults    mail_badpass
Defaults    secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo    ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d


Using the command
Code:
pkexec visudo


Will allow you to edit the sudoers file properly, and you can resume using sudo after this is solved.
The Truth is out there.
Be sure to check the Manual out and always report Bugs or feature requests.
[Image: psCXIcR.png]
Reply
#10
(02-17-2016, 10:30 PM)chicknfangz link Wrote:I did share them above. If you can read?

...I never said i needed to touch grub. READE THE ABOVE!!

Try to be respectful to those offering their time to help you, that kind of response will put people off wanting to help you.
The tone of the Forum here is friendly, and we will jealously defend that image.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)