LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 / MacOSX
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, 03:26 PM   #3
complich8
Member
 
Registered: Oct 2007
Distribution: rhel, fedora, gentoo, ubuntu, freebsd
Posts: 104

Rep: Reputation: 17
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.
 
1 members found this post helpful.
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration