Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Apr 2014 10:50:31 +0100
From:      Frank Leonhardt <frank2@fjl.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: Can't change user password
Message-ID:  <534517E7.7000206@fjl.co.uk>
In-Reply-To: <5342C9BC.7020808@inti.gob.ar>
References:  <5342A529.60600@inti.gob.ar> <20140407155639.f77d925e.freebsd@edvax.de> <5342C9BC.7020808@inti.gob.ar>

next in thread | previous in thread | raw e-mail | index | archive | help
On 07/04/2014 16:52, Juan Bernhard wrote:
> El 07/04/2014 10:56 a.m., Polytropon escribió:
>>> Hello list, I have a really strange problem. I can't chage a user
>>>> password, I tryed from the user itself, from root, in sigle user mode...
>>>> I also try to change the hsash in /etc/master.passwd. The passwd command
>>>> exit successfully, but nothing happens, the old password is not changed.
>>>> The only solution I found is to delete the user and create him again...
>> You should be able to force a password change with "passwd <user>"
>> as root, and run "pwd_mkdb /etc/master.passwd" to generate the
>> binary files. Those need to be "in sync" with the plaintext
>> files. See "man pwd_mkdb" and "man passwd" for details.
> Thanks a lot Polytropon! That worked for me... I was getting paranoid on
> this thing.
>
It's probably worth remembering the "vipw" utility, which is the safest 
way to edit passwd file directly, like we used to in the old days when 
it was a single plain text file. It sets and removes the appropriate 
locks and rebuilds the hidden version after doing some sanity checks on 
your edits.

Regards, Frank.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?534517E7.7000206>