evansj57
Posts: 9
Joined: Fri May 03, 2013 9:04 pm

Password won't update

Fri Dec 06, 2013 1:14 pm

I tried to change the default password for user 'pi' when logged in as pi.

'sudo passwd', gives me the message "password updated successfully" but it did not change.

I then managed to change the password for pi when logged in as root.

Is this is permissions issue?

The /etc/passwd file has the following permissions: - rw -r- -r-

The /etc/passwd file has the following permissions: - rw -r- ---

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Password won't update

Fri Dec 06, 2013 1:26 pm

sudo-itis.

If you have any problem with any program or command anywhere, try it again, with "sudo" in front of it.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

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: Password won't update

Fri Dec 06, 2013 3:00 pm

sudo passwd runs as the root (superuser, uid(0)) and will set it's password.
passwd runs as the logged in user and will set it's password but you need the existing password to do that.
sudo passwd someusernamehere will use superuser powers to set the password for someusernamehere without needing to know the existing password.
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
RaTTuS
Posts: 10563
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Password won't update

Fri Dec 06, 2013 3:07 pm

DougieLawson wrote:sudo passwd runs as the root (superuser, uid(0)) and will set it's password.
passwd runs as the logged in user and will set it's password but you need the existing password to do that.
sudo passwd someusernamehere will use superuser powers to set the password for someusernamehere without needing to know the existing password.
THIS^
passwd will change the password for the current user
sudo passwd will change the password for the root user
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

evansj57
Posts: 9
Joined: Fri May 03, 2013 9:04 pm

Re: Password won't update

Fri Dec 06, 2013 10:19 pm

Thanks, got it now.

Return to “Troubleshooting”