Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Apr 2017 20:02:46 +0100
From:      Anton Shterenlikht <mexas@bris.ac.uk>
To:        Polytropon <freebsd@edvax.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: cannot change password for an ordinary user
Message-ID:  <CAPcSSvJ2xnpBH4FcfRz3wmSPpUsNirS887CLzm4j7DXgrMvMpQ@mail.gmail.com>
In-Reply-To: <20170414123407.6d57f241.freebsd@edvax.de>
References:  <201704132135.v3DLZgS2008709@mech-as222.men.bris.ac.uk> <20170414123407.6d57f241.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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, ...
>



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