There was an error in my friend’s lappy when she tried to install something. The error was like shown below.
sudo: /etc/sudoers is owned by uid 1001, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
Then we checked the permissions of /etc folder through the command “ls -l” and mistakenly she has changed the ownership of the folder /etc/sudoers to specific user.
Then we remount the filesystem (/) as read-write after dropping to root shell in recovery mode.
mount -o remount,rw /
The first command remounts the root linux partition as read/write so that I can make changes to the files.
For more details on mount command refer the link.
Then changed the ownership of /etc folder through the command
sudo chown root:root /etc -R
And after that reboot the system and problem is solved.