• We did not send an email asking for donations - please read this post.

Please help!

Babylinux002

New Member
Joined
Mar 16, 2021
Messages
22
Reaction score
1
Credits
191
Hi, i try to change the sudoers file of parrot because everyone was have access to sudo command without password. The file was like this admin ALL=(ALL) NOPASSWD:ALL and i change NOPASSWD:ALL to NOPASSWD:root. Now when i try to make sudo command it prompt me this: user is not in the sudoers file. This incident will be reported. So i can no longer access the sudoers file and my system is lock.
 


OP
B

Babylinux002

New Member
Joined
Mar 16, 2021
Messages
22
Reaction score
1
Credits
191
I see i have to access the recovery menu from grub and choose the root shell, but this in ubuntu. I wonder how in persistent parrot.
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
4,968
Reaction score
3,613
Credits
36,220
If you know the root password you can just become root from the command-line, if not you will have to to boot from the installation into the live environment, mount the root filesystem, chroot into it and then fix it from there.
1. Boot from installation media.
2. mount the partition that contains your root partition, for example: sudo mount /dev/vda1 /mnt (You can find your root partition by running lsblk in the terminal)
3. Then chroot into your system: sudo chroot "/mnt/@"
4. From there you can edit your sudoers file using vim or nano
 
Last edited:
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Top