From owner-freebsd-questions@freebsd.org Sun Apr 16 19:02:47 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 E6CA0D416F0 for ; Sun, 16 Apr 2017 19:02:47 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from mail-oi0-x22a.google.com (mail-oi0-x22a.google.com [IPv6:2607:f8b0:4003:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AD605161A for ; Sun, 16 Apr 2017 19:02:47 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: by mail-oi0-x22a.google.com with SMTP id x184so38390750oia.1 for ; Sun, 16 Apr 2017 12:02:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bris-ac-uk.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=t7K4SVpl8EuXJd/IjHVUj4UTx9wiGa9GD5NjLh6huYM=; b=ZfaHBQVDxRXa0DdoUMqNkdprT/+kRK629ButtcQTBhpS5+EOX5q810cOJwZTzTw8sh AV9P4JLZMqdQPkousb5FUzPnHx54mHrH85TW2rEwBmEWjFPRwxb0PN/JgHlJxVSJaDBo FvhYk5UM8iZXaVU+oKmCoCm9/pnKXeh2LhPaub+qJIgb0myCfjFpJ3d0/+HBR2WQUyER TPyhHhjYB+Wb4pw596EzVmRXNp7LMXT3oFYhaIlLPxOjcWiX1jCT7un4EtSOTCd5QwUw YzC0ogUuyvbfDT3iKrTLUu2tzTnuanWvraxF+d1dlNpLUMDqrPlTtl1t9xq3jRahho5r TuHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=t7K4SVpl8EuXJd/IjHVUj4UTx9wiGa9GD5NjLh6huYM=; b=dbIHrNAkgLSyGZA9dYD2y6hgE8nBqkMBoQAb9CDEZmu8Ul+arTnM/Xh/7gIO4uTrnB XVJHEUfaVTSSZ5Ae5JZVfM/TECGaji8zo9xrbZOhsOcKDBnTn6HcvCpllYbzDZMgEmbh bg+vxW7tiRSyxPtLFyE3VKjOvtE/52WJHjAchOvXiKXLSR1Ce3AMgd5TMIV75V+VF91f iqGJ/xUMIr4g1px8yJPNUC0DUTjTMPw+pkQ8DORv9r/bhf3qrGYGBf6H72aX88fkFJVe bk3AKDkAGEvMDRm90aKrlyxXzTp/Ua4zCGm4BanUShS9tsQBBLt02vEeKA5A7gIy5MyI 24yQ== X-Gm-Message-State: AN3rC/4sInkk8rnOXZxbADxpB2khezzvQ4uUESlKtKHXLMndQuyAoUEI T/UgC6/+r2/8vj84sSEnE8BjYhZd9V2J X-Received: by 10.157.46.177 with SMTP id w46mr2874852ota.78.1492369366819; Sun, 16 Apr 2017 12:02:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.3.170 with HTTP; Sun, 16 Apr 2017 12:02:46 -0700 (PDT) In-Reply-To: <20170414123407.6d57f241.freebsd@edvax.de> References: <201704132135.v3DLZgS2008709@mech-as222.men.bris.ac.uk> <20170414123407.6d57f241.freebsd@edvax.de> From: Anton Shterenlikht Date: Sun, 16 Apr 2017 20:02:46 +0100 Message-ID: Subject: Re: cannot change password for an ordinary user To: Polytropon Cc: freebsd-questions@freebsd.org Content-Type: text/plain; charset=UTF-8 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: Sun, 16 Apr 2017 19:02:48 -0000 Thanks, that helped. Still don't know what happened and why direct use of pwd_mkdb was needed. Anton On 14/04/2017, Polytropon 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 > > 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, ... >