From owner-freebsd-bugs@freebsd.org Tue Aug 11 19:16:20 2020 Return-Path: Delivered-To: freebsd-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E0803B54A4 for ; Tue, 11 Aug 2020 19:16:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4BR2ch01xmz3fch for ; Tue, 11 Aug 2020 19:16:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 00DC53B5707; Tue, 11 Aug 2020 19:16:20 +0000 (UTC) Delivered-To: bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 00A833B5335 for ; Tue, 11 Aug 2020 19:16:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BR2cg6CsKz3frJ for ; Tue, 11 Aug 2020 19:16:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B81AE1FA74 for ; Tue, 11 Aug 2020 19:16:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 07BJGJZd092829 for ; Tue, 11 Aug 2020 19:16:19 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 07BJGJOv092828 for bugs@FreeBSD.org; Tue, 11 Aug 2020 19:16:19 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 248574] rmuser pw: pw_copy(): Invalid argument Date: Tue, 11 Aug 2020 19:16:19 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: cem@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Aug 2020 19:16:20 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D248574 --- Comment #1 from Conrad Meyer --- This indicates that the failing part of rmuser.sh is in rm_user(): 182 ! verbose && echo -n " passwd" 183 verbose && echo -n " from the system:" 184 ${PWCMD} userdel -n $login $pw_rswitch And the output of 'pw userdel -n vmail' (with or without additional -r) is: pw: entry inconsistent pw: pw_copy(): Invalid argument Both the warning and EINVAL come from libutil's pw_copy(), while the err() termination comes via the pw_update() in pw(8). The warning is produced if pw_equal() fails between the old_pw supplied to pw_copy() and the record of= the same name parsed by pw_scan() out of /etc/master.passwd. pw_equal looks at pw_name, pw_uid, pw_gid, pw_class, pw_change, pw_expire, pw_gecos, pw_dir, = and pw_shell. pw(8)'s old_pw comes from GETPWNAM(), which ... is PWF._getpwnam... which is just getpwnam(3) for non-relocated pw(8). getpwnam(3) goes through nsdispa= tch and looks at /etc/pwd.db (or /etc/spwd.db) directly. So it seems like your /etc/master.passwd is out of sync with your /etc/pwd.= db. --=20 You are receiving this mail because: You are the assignee for the bug.=