Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-31-2007, 05:15 PM   #1
Registered: Dec 2005
Posts: 32

Rep: Reputation: 15
restrict login to nis netgroups

How can you restrict login access on the linux server to only members of a NIS netgroup? What files needs top be modified?

Old 11-01-2007, 03:40 PM   #2
LQ Newbie
Registered: Jun 2007
Location: Northern Arizona
Distribution: Redhat / Knoppix / Ubuntu
Posts: 8

Rep: Reputation: 0
restrict login

You need to be more specific so this answer may not apply. All users that need "full" access to the server need a std login. If you have services such as ftp that you want users to have access to, you can disable anonymous login and allow a specific group of users. These users can use /sbin/nologin as their shell which will prevent them from actually login onto the server but still grant them login to services such as ftp.

If this does not answer your question, please provide more detail into what you are trying to accomplish.
Old 11-01-2007, 04:26 PM   #3
Registered: Oct 2007
Distribution: rhel, fedora, gentoo, ubuntu, freebsd
Posts: 104

Rep: Reputation: 16
an easy way to do this is something like this:

in /etc/passwd,


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 04:27 PM.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
NIS Client can not login to NIS Master Server Free_beer Ubuntu 3 10-09-2006 03:57 PM
how to restrict a user to login from one specified machine? hueofwind Linux - General 5 08-25-2006 10:13 AM
Restrict login by login from single IP cachemonet Linux - Security 1 01-27-2006 11:47 AM
Issues with NIS and netgroups Wells Debian 0 10-17-2005 12:16 PM
Advice on Netgroups File with NIS lemay_jeff Linux - Networking 0 10-27-2004 12:26 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:29 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration