NetBSD Problem Report #17849

Received: (qmail 26892 invoked by uid 605); 6 Aug 2002 01:54:15 -0000
Message-Id: <200208060154.g761s8l20402@redback.spyda.net>
Date: Tue, 6 Aug 2002 11:54:08 +1000 (EST)
From: grant@netbsd.org
Sender: gnats-bugs-owner@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: usermod doesn't correctly handle YP users, fails to clean up ptmp file
X-Send-Pr-Version: 3.95

>Number:         17849
>Category:       bin
>Synopsis:       usermod doesn't correctly handle YP users, fails to clean up ptmp file
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    agc
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 06 01:55:00 +0000 2002
>Closed-Date:    Tue Aug 06 11:58:08 +0000 2002
>Last-Modified:  Tue Aug 06 11:58:08 +0000 2002
>Originator:     grant beattie
>Release:        NetBSD 1.6_BETA5
>Organization:
>Environment:
System: NetBSD redback 1.6_BETA5 NetBSD 1.6_BETA5 (GENERIC) #0: Tue Jul 30 12:29:28 EST 2002 grant@mofo:/raid/netbsd/netbsd-1-6/20020729/sparc/obj/sys/arch/sparc/compile/GENERIC sparc
Architecture: sparc
Machine: sparc
>Description:
usermod does not correctly handle adding YP users to groups, and fails to
clean up after itself.

# grep wheel /etc/group
wheel:*:0:root
# grep grant /etc/passwd
# ypcat passwd | grep grant
grant:x:141:11:grant beattie:/home/users/grant:/bin/tcsh
# usermod -G wheel grant
pwd_mkdb: user `grant' not found in password file
usermod: pw_mkdb failed: Resource temporarily unavailable
# ls -l /etc/ptmp
-rw-------  1 root  wheel  821 Aug  6 11:47 /etc/ptmp
# grep wheel /etc/group
wheel:*:0:root,grant

>How-To-Repeat:
see above.
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: agc 
State-Changed-When: Tue Aug 6 04:56:40 PDT 2002 
State-Changed-Why:  
agc added code to (a) check that the user is a "local" one, i.e. not 
via NIS, before attempting to modify or remove the user, and (b) 
clean up after ourselves if pw_mkdb(3) fails. 


Responsible-Changed-From-To: bin-bug-people->agc 
Responsible-Changed-By: agc 
Responsible-Changed-When: Tue Aug 6 04:56:40 PDT 2002 
Responsible-Changed-Why:  
agc took responsibility for this one. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.