an easy way to do this is something like this:
in /etc/passwd,
+@groupname::::::/bin/bash
+::::::/sbin/nologin
NIS users in the netgroup groupname will have their shell be /bin/bash, where all other NIS users will be /sbin/nologin users (you could also do /bin/false, or wherever your "false" or "nologin" happens to reside -- make sure you've got the right path to avoid unpredictable results).
If your users have different shells than just bash, you could also probably go just +@groupname:::::: for them, and just inherit their shell from the NIS server... but the point is to override that shell for non-group members.
Last edited by complich8; 11-01-2007 at 03:27 PM.
|