cannot change password for an ordinary user

Anton Shterenlikht mexas at bris.ac.uk
Sun Apr 16 19:02:48 UTC 2017


Thanks, that helped. Still don't know what happened and
why direct use of pwd_mkdb was needed.

Anton

On 14/04/2017, Polytropon <freebsd at edvax.de> wrote:
> On Thu, 13 Apr 2017 22:35:42 +0100 (BST), Anton Shterenlikht wrote:
>> On 11.0-RELEASE-p9, passwd command
>> seems to exit with no error for an ordinary user,
>> but the passwd is not updated, i.e. after passwd
>> has exited, this user can login only with the old
>> password, not the new.
>>
>> I found this thread:
>> https://forums.freebsd.org/threads/49802
>> which suggested to use pwd_mkdb.
>>
>> I decided to check first, and got:
>>
>> # pwd_mkdb -C /etc/passwd
>> pwd_mkdb: corrupted entry
>> pwd_mkdb: at line #3
>> pwd_mkdb: /etc/passwd: Inappropriate file type or format
>>
>>
>> Should I be worried?
>
> No, but use the correct program invocation:
>
> 	# pwd_mkdb -C /etc/master.passwd
>
> That is the _actual_ password file. The "pwd_mkdb" program will
> use it to create the appropriate db files.
>
> See "man pwd_mkdb" for details.
>
>
>
>> And how can change my ordinary user's password?
>
> Usually the "passwd" program is being used. Directly by the user:
>
> 	% passwd
>
> Or by root for a user:
>
> 	# passwd <username>
>
> Check "man 1 passwd" and "man chpass" for additional information.
>
> The use of this program will cause the databases to be updated
> (see above).
>
>
>
>
> --
> Polytropon
> Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...
>


More information about the freebsd-questions mailing list