I tried to modify the sudoers file on Raspbian /etc/sudoers
, and it looks like I made a mistake, as I'm unable to modify it again. I am also unable to call any command that requires sudo
permissions.
So I have done some research and I found a solution herehere.
The solution uses the command *pkexec visudo*
, but when I tried that it gives me an error message: Authentication is needed to run '/usr/sbin/visudo' as the super user
. Also there is a drop-down list, it contains only the word 'root' (and couldn't be changed). As well as named Identity and a blank text-box named Password.
So the question is how could I know the root password? I tried 'root', 'raspberry', 'admin' e.t.c... but nothing has worked.
According to the answers, it seems a little bit impossible to log in using root, then using pkexec visudo will not solve my problem! and according to the answer my only way is to use a linux pc in order to view my sd contents and modify the sudoers file. I've already installed Debian on my virtual machine, and Finally I can access the sudoers file but I have no permission to access it! it says that I'm not the owner of the file! I understand this security issue, but as many people during my online search suggests to use a linux pc to modify the sudoers file, then there should be a way to gain access to it. is there anyone know this way?