I did a silly thing. I changed the permissions of my /etc folder using
sudo chmod -R ugo+rw /etc
After that I did some damage control using the command
pkexec chmod 755 /etc
Then I was able to the sudo commands but every time I use a sudo command a warning comes
sudo: /etc/sudoers.d is world writable
Is there a way to completely reset default permissions for /etc ?