LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 10-31-2007, 04:15 PM   #1
kapilcool
Member
 
Registered: Dec 2005
Posts: 32

Rep: Reputation: 15
restrict login to nis netgroups


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

Thanks
Kapil
 
Old 11-01-2007, 02:40 PM   #2
JHPArizona
LQ Newbie
 
Registered: Jun 2007
Location: Northern Arizona
Distribution: Redhat / Knoppix / Ubuntu
Posts: 4

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, 03:26 PM   #3
complich8
Member
 
Registered: Oct 2007
Distribution: rhel, fedora, gentoo, ubuntu, freebsd
Posts: 104

Rep: Reputation: 15
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.
 
  


Reply


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 02:57 PM
how to restrict a user to login from one specified machine? hueofwind Linux - General 5 08-25-2006 09:13 AM
Restrict login by login from single IP cachemonet Linux - Security 1 01-27-2006 10:47 AM
Issues with NIS and netgroups Wells Debian 0 10-17-2005 11:16 AM
Advice on Netgroups File with NIS lemay_jeff Linux - Networking 0 10-27-2004 11:26 AM


All times are GMT -5. The time now is 04:02 AM.

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