Bug 3692 - Useradd adds users above NIS rules in /etc/passwd
Summary: Useradd adds users above NIS rules in /etc/passwd
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: shadow-utils
Version: 6.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-06-24 02:36 UTC by Bob Plankers
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-07-28 06:58:18 UTC
Embargoed:


Attachments (Terms of Use)

Description Bob Plankers 1999-06-24 02:36:54 UTC
I have a server providing NIS information to several
workstations. The /etc/passwd on the server is used to
build the NIS maps. However, I would like to restrict the
users from logging into the server by placing NIS rules
into /etc/passwd above the user entries.
However, /usr/sbin/useradd places new entries above the NIS
rules, allowing the users to log in, and requiring manual
intervention & editing of /etc/passwd.

A sample of what I am talking about:

ftp:x:14:50:FTP User:/admin/ftp:
nobody:x:99:99:Nobody:/:
eddie:x:4156:100:Ed Scissorhands:/home/usr3/eddie:/bin/tcsh
+plankers::0:0:::
+:*:0:0:::/etc/noshell
plankers:x:500:60:Bob Plankers,,,,:/admin/plankers:/bin/tcsh
engroth:x:502:60:Eric N. Groth,,,,:/admin/engroth:/bin/tcsh
nmedbery:x:501:60:Nathan Medbery:/admin/nmedbery:/bin/tcsh
jmgray:x:503:60:Jesse M. Gray,,,,:/admin/jmgray:/bin/tcsh

In this case, all users but 'plankers' have /etc/noshell as
their shell (and this works nicely). However, user 'eddie'
was added last, and was placed above the NIS login
restrictions, allowing him to log in to the server. Is this
intended? (if so just tell me to buzz off :-) ).

Thank you, fellows.

Comment 1 Jay Turner 1999-06-24 15:10:59 UTC
This issue has been forwarded to a developer for further review.

Comment 2 Cristian Gafton 1999-07-28 06:58:59 UTC
This is the way it is supposed to be. The NIS entries are kept the
last ones, since some documented security mechanisms depend on it
(like your overriding of the noshell stuff)

I remember seeing the ame behavior on solaris.


Note You need to log in before you can comment on or make changes to this bug.