Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Apr 2017 12:34:07 +0200
From:      Polytropon <freebsd@edvax.de>
To:        mexas@bris.ac.uk
Cc:        freebsd-questions@freebsd.org
Subject:   Re: cannot change password for an ordinary user
Message-ID:  <20170414123407.6d57f241.freebsd@edvax.de>
In-Reply-To: <201704132135.v3DLZgS2008709@mech-as222.men.bris.ac.uk>
References:  <201704132135.v3DLZgS2008709@mech-as222.men.bris.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
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?20170414123407.6d57f241.freebsd>