From owner-freebsd-questions@freebsd.org Fri Apr 14 10:34:18 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C69CCD3C63E for ; Fri, 14 Apr 2017 10:34:18 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mailrelay13.qsc.de (mailrelay13.qsc.de [212.99.187.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.antispameurope.com", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3B0D71A9 for ; Fri, 14 Apr 2017 10:34:17 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de ([213.148.129.14]) by mailrelay13.qsc.de; Fri, 14 Apr 2017 12:34:09 +0200 Received: from r56.edvax.de (port-92-195-127-117.dynamic.qsc.de [92.195.127.117]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 897BD3CC42; Fri, 14 Apr 2017 12:34:08 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id v3EAY7gI002150; Fri, 14 Apr 2017 12:34:07 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Fri, 14 Apr 2017 12:34:07 +0200 From: Polytropon 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> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-cloud-security-sender: freebsd@edvax.de X-cloud-security-recipient: freebsd-questions@freebsd.org X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mailrelay13.qsc.de with C7C94683D12 X-cloud-security-connect: mx01.qsc.de[213.148.129.14], TLS=1, IP=213.148.129.14 X-cloud-security: scantime:.1228 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 10:34:18 -0000 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 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, ...