How can we fix the broken sudoers file /etc/sudoers: syntax error near line 21 in Ubuntu OS


How can we fix broken sudoers files in Ubuntu OS
======================================

Hi viewers!!! in this tutorial I'll show you how we can quickly fix the broken sudores files.

For this tutorial I'll give a normal user to sudo right but made some mistake in /etc/sudores to simulate the following error as showing below



Now see there is a syntax error in sudores files and we can not able to rectify this using the sudo command again. We are locked now Lets try to edit sudoers file again to correct this No luck here so
now what to do. lets try to change to root user and see what happen we are locked completely.

So how we can quickly fix this error without reboot the system and going to the recovery shell.
you can follow all the instruction in the video tutorial as showing below or you can follow the instruction mentioned in this article



So here is the trick just use the following one single command but very important this will work only on the OS installed with GUI ;)

pkexec nano /etc/sudoers

Once you run the above command it'll ask you for enter password as showing below


now enter the administrator password here and

wolla!!!! the file is now open and now lets make the changes



and save the file and then try again and you will find that now sudo command is back on track!!!!!

Thanks for watching this tutorial I hope you like this tutorial. For more please do visit my blog site and also subscribe my channel on youtube.

Have a nice day !!!!!

Share:

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

WELCOME TEXT

Welcome !!! viewers and thank you to visit my blog noteoftech this blog will help you to find the resolution of many tech related issue and also very useful tech related tutorial. So please don't forget to visit my blog on daily basis...and please bookmark this page also. So enjoy this blog and have a nice day!!!!.

About Me

Find Us On Youtube

Hi viewers!!! you can find other useful tech tutorial on our Youtube Channel KonwItFree Please click below to visit our channel

Popular Posts

Powered by Blogger.

Recent Posts

PAGES

Archive

Labels

AWS (7) CCNA (2) CCNP (2) cisco (2) Cyberoam (1) eve-ng (2) Firewall (5) googlecloud (3) Juniper (1) MACOS (1) Mint OS (2) Openldap (5) oraclecloud (6) other (15) pfsense (5) securecrt (1) Sophos (3) Ubuntu (9) Vmware (9) VPN (1) Window (5) Window10 (9) WIndow7 (4) WinServer (2) WinXP (1) xubuntu (2)

Labels