BiscuitDuke
Posts: 2
Joined: Thu Mar 26, 2015 10:37 pm

Default password wont change

Fri Jul 10, 2015 12:23 am

I have successfully turned my raspberry pi into a vpn, but when I try to change the default password "raspberry" it does not change. I get the message that says it was successfully updated, but when I log back in to the pi or even though ssh, the only password that stays working is the default. Any idea what I;'m doing wrong?
Also if anyone knows how to change the default username "pi", I would appreciate that was well.

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

Re: Default password wont change

Fri Jul 10, 2015 6:04 am

How are you trying to change the password?

This should work

Code: Select all

pi@raspi2 ~ $ passwd
This will not (it changes the root password, which isn't normally set on Raspbian.

Code: Select all

pi@raspi2 ~ $ sudo passwd

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Default password wont change

Fri Jul 10, 2015 9:45 am

rpdom wrote: This will not (it changes the root password, which isn't normally set on Raspbian.

Code: Select all

pi@raspi2 ~ $ sudo passwd

Code: Select all

sudo passwd pi
will change pi's password without needing to know the old password (which is why having sudo with NOPASSWD is so dangerous). All of my systems have a root password set about five seconds after the first boot is complete.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
jojopi
Posts: 3274
Joined: Tue Oct 11, 2011 8:38 pm

Re: Default password wont change

Fri Jul 10, 2015 10:25 am

DougieLawson wrote:sudo passwd pi will change pi's password without needing to know the old password (which is why having sudo with NOPASSWD is so dangerous).
If you already allow an attacker to run shell commands as user pi, they obviously do not need to change the password. And locking you out in such an obvious way is far less dangerous than almost anything else they might do.

An extra layer of password badgering gives you nothing more than a false sense of security. If you allow your user account to be compromised, you can no longer trust anything you do from that account, and particularly you must never escalate privileges with either sudo or su, regardless of password.

beira
Posts: 6
Joined: Mon Apr 09, 2018 9:38 am

Re: Default password wont change

Wed Apr 11, 2018 2:40 pm

Thanks for all. :D :D :D :D

Return to “Beginners”