[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

user/3727: users and groups are added after NIS entries



>Number:         3727
>Category:       user
>Synopsis:       users and groups are added after NIS entries
>Confidential:   yes
>Severity:       non-critical
>Priority:       low
>Responsible:    bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 25 04:20:01 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Brendan Strejcek
>Release:        
>Organization:
net
>Environment:
	
	System      : OpenBSD 3.4
	Architecture: OpenBSD.i386
	Machine     : i386
>Description:
	If you have NIS entries in the password or group database, adding
	new users with the useradd and groupadd tools will cause new
	entries to be created after the NIS entries, contrary to the
	expectations of most NIS admins. Further, many packages/ports make
	use of these programs during install.
>How-To-Repeat:
	echo +::: >>/etc/group # add an nis entry
	groupadd junk
	tail -2 /etc/group
	+:::
	junk:*:1000:
	
	EDITOR=ed vipw <<EOF # add an nis entry
	$
	a
	+:::::::::/sbin/nologin
	.
	w
	q
	EOF
	useradd junk
	tail -2 /etc/passwd
	+:*:0:0:::/sbin/nologin
	junk:*:1000:10::/home/junk:/bin/csh
>Fix:
	Workaround: delete and re-add nis entries beofre and after
	adding a user/group (or installing a package/port which adds
	a group). A real fix would be to modify usr.sbin/user/user.c
	so that it adds new entries before nis entries.


>Release-Note:
>Audit-Trail:
>Unformatted: