RiccardoF88
Posts: 1
Joined: Fri Jul 05, 2019 2:22 pm

Sudo Su password rejected

Fri Jul 05, 2019 2:48 pm

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 ?

DirkS
Posts: 10010
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Sudo Su password rejected

Fri Jul 05, 2019 3:25 pm

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)

User avatar
rpdom
Posts: 15572
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Sudo Su password rejected

Fri Jul 05, 2019 3:53 pm

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/?

User avatar
DougieLawson
Posts: 36526
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Sudo Su password rejected

Fri Jul 05, 2019 4:32 pm

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
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Return to “Troubleshooting”