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:

how we can create a batch file which will shrink our existing volume an create a new volume on window machine

Hello viewer In this tutorial I'll show you how we can create a batch file which will shrink our existing volume an create a new volume on window machine.

You can follow the video tutorial give below or you can follow the steps mentioned here


I am using a test machine to demonstrate this procedures So in this window machine we a one volume that is C and it's size is around  150GB see the below screenshot



so our goal is to create a new volume of 40GB out of this 150GB drive to achieve like something mentioned below



So here is the script for this process in one single click

@echo off
(echo select disk 0
 echo list vol
 echo select volume=C
 echo shrink desired 40000
 echo list volume
 echo create partition primary
 echo format quick fs=ntfs label="Data"
 echo assign letter=G:
) | diskpart

pause

what all you need is to type this into a notepad and save this file as .bat then run
as administrator.



very important : This script is wrote to keep in mind that there is only one volume on your hard disk that is "C" and you need to create the new volume on the  same disk like in our case we have only one disk that is disk 0

so lets test the scripts in real world. Please run the script as an administrator


That's it this will save lots of your time.Please see the final out put as showing the screenshot below


I hope you like this tutorial please do visit on by blog for more informative tutorial.

Thanks and have a nice day!!!!!!
Share:

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