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.
This issue has been forwarded to a developer for further review.
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.