Binod-BK
(Binod-BK)
August 31, 2020, 6:19am
1
I edited my sudoers file correctly as far as I know using the command " sudo nano /etc/sudoers"
and after I saved it I cannot use my sudo command now .
Everytime I try to use sudo command it says ‘Segmentation error’ and now I cant go to root also when I try the command
su
it asks for password and says
Authentication failure
.
Welcome @Binod-BK ,
Please be careful and check files for comments before directly editing.
Found at top of /etc/sudoers:
└──╼ #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.
Binod-BK
(Binod-BK)
August 31, 2020, 6:40am
3
When I run visudo it says permission denied and when
I run sudo visudo its the same
segmentation fault
Try selecting recovery mode at boot and repair it from there.
EDIT: In recovery mode you should be able to drop right into root shell (do not need sudo command to do so).
Binod-BK
(Binod-BK)
August 31, 2020, 9:18am
5
I just tried it. And it also didnt worked.
When I run the command
sudo whoami
after the recovery boot it said segmentation fault.
Boot into a live session of Linux (off Parrot USB or otherwise).
Mount the harddrive /etc containing your sudoer file.
While in this live session you can edit the mounted /etc/sudoer file by specifying the file using this command:
sudo visudo -f /mountpoint/etc/sudoers
Replace /mountpoint above with your mount point used.
2 Likes
system
(system)
Closed
December 30, 2020, 4:52pm
7
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.