Sudoer File Recovery

Asked by Khawar

I had lost sudoer file accidentally. How to recover it?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu sudo Edit question
Assignee:
No assignee Edit question
Solved by:
N1ck 7h0m4d4k15
Solved:
Last query:
Last reply:
Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#1

Hi ,

I post you my sudoers file .. copy it and then place it to correct path like this.

======================
pckexec gedit /etc/sudoers
======================

Here is my sudoers file
======================================================================================
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

Defaults env_reset

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root ALL=(ALL) ALL

# Allow members of group sudo to execute any command after they have
# provided their password
# (Note that later entries override this, so you might need to move
# it further down)
%sudo ALL=(ALL) ALL
#
#includedir /etc/sudoers.d

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

Revision history for this message
Best N1ck 7h0m4d4k15 (nicktux) said :
#2

Hi ,
I am very sorry for misspelling , the correct command is

======================
pkexec gedit /etc/sudoers
======================

Thanks

Revision history for this message
Khawar (k-rehman163) said :
#3

Thanks @NikTh. I got it