Date: Tue, 11 Aug 2020 19:16:19 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 248574] rmuser pw: pw_copy(): Invalid argument Message-ID: <bug-248574-227-1gSlVKE9yD@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-248574-227@https.bugs.freebsd.org/bugzilla/> References: <bug-248574-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D248574 --- Comment #1 from Conrad Meyer <cem@freebsd.org> --- 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.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-248574-227-1gSlVKE9yD>