By mistake I change the permission of /etc/sudoers file on Ubuntu OS, now when applying any command using sudo, its giving error,
- sudo: /etc/sudoers is world writable
- sudo: no valid sudoers sources found, quitting
- sudo: unable to initialize policy plugin
I searched on goggle & getting many solutions but none worked in my case.
As I have linux remote OS server & I could not configure it by starting it & changing while boot up process as many people are giving solution for that.
Even pkexec command is also asking for password through which user I logged in to my server but I haven't password. I am connecting to remote server using .pem file through SSH command. I used,
pkexec chmod 0440 /etc/sudoers, but it isn't worked as asked for password.
I am not able to apply any command such as, chown,chmod to alter permission as it is run only through sudo & sudo command isn't working.
Please let me know how to get rid out of this....
Please reply. I will be grateful to you.
Thank you.