
What's stored in shadow is a one-way hash of the actual password.

Note that "the actual password" is not really stored anywhere.
#Raspberry pi create new sudo user password
For most entries this will be x, indicating the actual password is in another file, /etc/shadow. Here the first one is the name ( root), the third and fourth are the numerical uid and gid (both 0), and the second is for the password. The fields are separated by colons and explained in man 5 passwd (note the 5, since man passwd will give you the man page for the command passwd section 5 is for configuration files, and in this case they have the same name). This is done by starting with an entry in /etc/password which begins: root:x:0:0: Raspbian by default is configured so that the root account can't be logged into using a password.

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. but nothing has worked.Īccording 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. So the question is how could I know the root password? I tried 'root', 'raspberry', 'admin' e.t.c. As well as named Identity and a blank text-box named Password. Also there is a drop-down list, it contains only the word 'root' (and couldn't be changed).

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. So I have done some research and I found a solution here. I am also unable to call any command that requires sudo permissions. 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.
