Page 1 of 1

Sudo Su password rejected

Posted: Fri Jul 05, 2019 2:48 pm
by RiccardoF88
Hello,

I'm using a Raspberry Pi 3 B with Raspbian Buster lite 4.19 and Desktop env. manually installed.
I have 2 accounts:
The first one is the one that used to be the "pi" account with password "raspberry", which has been renamed "admin", with password "adminusr".
The second one is the "root" account with password "adminroot".

When I connect via SSH to the admin and need to send a command with "sudo su" or just need to do a quick "sudo -i", the terminal asks for the password (which is the root), I write it and hit ENTER, then the terminal says "Retry", in other words, it doesn't accept the password.
The same happens when remotely connected via VNC.

I can't access as root via SSH since it doesn't accepts the corresponding password, I've tryed to do a "passwd -a root" but I don't know what I'm missing, it keeps prompting the help guide for this.

So, I need help to see what am I missing here, Why I can't connect via ssh as root? and why the termin is refusing the root password when logged as admin ?

Re: Sudo Su password rejected

Posted: Fri Jul 05, 2019 3:25 pm
by DirkS
Did you allow root logins with password in the sshd configuration (/etc/ssh/sshd_config)?

BTW: I would set up passwordless SSH logins anyway (private / public key)

Re: Sudo Su password rejected

Posted: Fri Jul 05, 2019 3:53 pm
by rpdom
The password you enter for sudo is the user password, not the root one.

Did you set your new user up correctly in /etc/sudoers.d/?

Re: Sudo Su password rejected

Posted: Fri Jul 05, 2019 4:32 pm
by DougieLawson
rpdom wrote:
Fri Jul 05, 2019 3:53 pm
The password you enter for sudo is the user password, not the root one.
...
Unless you change the default in /etc/sudoers with

Code: Select all

Defaults        rootpw