From owner-freebsd-bugs@freebsd.org Mon Apr 16 06:04:52 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE27DF8B3C8 for ; Mon, 16 Apr 2018 06:04:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 57C6382443 for ; Mon, 16 Apr 2018 06:04:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 18C46F8B3C4; Mon, 16 Apr 2018 06:04:52 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 071DBF8B3C3 for ; Mon, 16 Apr 2018 06:04:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 996BD82442 for ; Mon, 16 Apr 2018 06:04:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id E436917180 for ; Mon, 16 Apr 2018 06:04:50 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w3G64ohJ014553 for ; Mon, 16 Apr 2018 06:04:50 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w3G64oxS014544 for bugs@FreeBSD.org; Mon, 16 Apr 2018 06:04:50 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 227541] 'pw userdel' probrem with NIS Master Date: Mon, 16 Apr 2018 06:04:50 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: hsakamt@tsnr.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: 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.25 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Apr 2018 06:04:53 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227541 Bug ID: 227541 Summary: 'pw userdel' probrem with NIS Master Product: Base System Version: 11.1-STABLE Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: hsakamt@tsnr.com Hello, I setup a FreeBSD box as NIS master. The 'useradd' and 'usermod' options of= the 'pw' command work fine, but there are two problems with the 'userdel' optio= n. 1. 'pw userdel' always fail with error: pw: pw_copy(): No such file or directory Because "GETPWNAM(user)" at line 102 of pwdupd.c seems to have destroyed the 'pwd' global variable.=20 2. 'pw userdel' does not update "NIS maps" with '-Y' option. Workaround patch for 11-STABLE: diff -u pw_user.c.orig pw_user.c --- pw_user.c.orig 2018-04-16 14:26:59.461462000 +0900 +++ pw_user.c 2018-04-16 14:27:21.843681000 +0900 @@ -963,7 +963,7 @@ else grname[0] =3D '\0'; - rc =3D delpwent(pwd); + rc =3D delpwent(nis ? pw_dup(pwd) : pwd); if (rc =3D=3D -1) err(EX_IOERR, "user '%s' does not exist", pwd->pw_name); else if (rc !=3D 0) @@ -1024,6 +1024,9 @@ "completely "); } + if (nis && nis_update() =3D=3D 0) + pw_log(cnf, M_ADD, W_USER, "NIS maps updated"); + return (EXIT_SUCCESS); } Thank you. --=20 You are receiving this mail because: You are the assignee for the bug.=