|Summary:||Useradd adds users above NIS rules in /etc/passwd|
|Product:||[Retired] Red Hat Linux||Reporter:||Bob Plankers <plankers>|
|Component:||shadow-utils||Assignee:||Cristian Gafton <gafton>|
|Status:||CLOSED WONTFIX||QA Contact:|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||1999-07-28 06:58:18 UTC||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Cloudforms Team:||---||Target Upstream Version:|
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.