Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
09-17-2012, 01:33 AM
|
#1
|
|
Member
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 819
|
NIS+NFS: how to prevent users from logging directly into the server?
Hi,
I have setup a network with centralized authentication, as described in this HOWTO:
http://docs.slackware.com/howtos:roaming_profiles
Everything works fine, but I need to add one more restriction. Users are all able to log into their account from any desktop client, but how can I prevent them from logging directly into the server? In short...
- Any user can log into his or her account on any desktop client
- No users should be allowed to log in directly into the server.
- Similarly, users shouldn't be able to ssh into the server with their own account
Why would I want to do this? Well, this is a multi-purpose server that not only holds all account information on the NIS server and all users' /home directories (shared by NFS). It's also a Samba server with mixed clearance levels (public, confidential), and some of the data is - in theory - readable for users. The measure described above would simply prevent users from snooping around in /srv/samba/ on the server.
|
|
|
|
09-17-2012, 01:41 AM
|
#2
|
|
Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 18 with Awesome WM
Posts: 6,805
|
Hello,
Have a look at:
more in particular, AllowUsers and DenyUsers. By using those keywords you can restrict access to your server to (a) specific user(s) through SSH while maintaining your user setup. The only thing you'll need to do besides that is lock the door to the server room so that they don't have physical access to the console.
Kind regards,
Eric
|
|
|
|
09-17-2012, 02:46 AM
|
#3
|
|
Member
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 819
Original Poster
|
Quote:
Originally Posted by EricTRA
Hello,
Have a look at:
more in particular, AllowUsers and DenyUsers. By using those keywords you can restrict access to your server to (a) specific user(s) through SSH while maintaining your user setup. The only thing you'll need to do besides that is lock the door to the server room so that they don't have physical access to the console.
Kind regards,
Eric
|
Unfortunately the server is physically accessible to users, and there is no way to prevent that. That's why I wonder if there's a way to configure it so that only me (kikinovak) and root can log into the server directly.
|
|
|
|
09-17-2012, 03:25 AM
|
#4
|
|
Member
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 630
Rep: 
|
man 5 nologin
|
|
|
|
09-17-2012, 01:58 PM
|
#5
|
|
Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 18 with Awesome WM
Posts: 6,805
|
Quote:
Originally Posted by kikinovak
Unfortunately the server is physically accessible to users, and there is no way to prevent that. That's why I wonder if there's a way to configure it so that only me (kikinovak) and root can log into the server directly.
|
Hi,
There's your first and most important flaw in security in my opinion. Why on earth would you allow physical access to your server? There's no way you can prevent a medium clever guy to get access to your machine one way or another.
Kind regards,
Eric
---------- Post added 17-09-12 at 20:59 ----------
Quote:
Originally Posted by wildwizard
man 5 nologin
|
Hi,
Easy enough to bypass since users have physical access to the server.
Kind regards,
Eric
|
|
|
|
09-17-2012, 11:40 PM
|
#6
|
|
Member
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 819
Original Poster
|
Quote:
Originally Posted by EricTRA
Hi,
There's your first and most important flaw in security in my opinion. Why on earth would you allow physical access to your server? There's no way you can prevent a medium clever guy to get access to your machine one way or another.
Kind regards,
Eric
---------- Post added 17-09-12 at 20:59 ----------
Hi,
Easy enough to bypass since users have physical access to the server.
Kind regards,
Eric
|
It's not only this single install. More often that not, I get called in small companies or local administrations to replace the Windows-only network by either a Linux network or a mixed network. Most of the time, I don't get to choose the physical location of server and clients. They're already there. So I have to deal with it.
Though I must add in practical life, the security flaw is next to zero. My most "dangerous" users are 15-20-year-old students in a school, and they do in fact login to the server on my desk sometimes... only to be bored to death after two seconds because "there's only this black and white thingy there's not even a mouse".
|
|
|
|
09-18-2012, 03:12 AM
|
#7
|
|
Member
Registered: Apr 2008
Location: Coventry, United Kingdom
Distribution: Slackware64, Slackware64 13.37, linuxslackware
Posts: 81
Rep:
|
Quote:
Originally Posted by kikinovak
...
Though I must add in practical life, the security flaw is next to zero. My most "dangerous" users are 15-20-year-old students in a school, and they do in fact login to the server on my desk sometimes... only to be bored to death after two seconds because "there's only this black and white thingy there's not even a mouse".
|
Well, although this kind of "psychological" firewall could be valid for the majority of 15~20-years-old students so used to MS Windows or OSX, that is not going to prevent one or two "wannabe-hacker" juveniles trying to challenge the system, IMHO.
|
|
|
|
09-18-2012, 06:33 AM
|
#8
|
|
Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 18 with Awesome WM
Posts: 6,805
|
Quote:
Originally Posted by kikinovak
It's not only this single install. More often that not, I get called in small companies or local administrations to replace the Windows-only network by either a Linux network or a mixed network. Most of the time, I don't get to choose the physical location of server and clients. They're already there. So I have to deal with it.
Though I must add in practical life, the security flaw is next to zero. My most "dangerous" users are 15-20-year-old students in a school, and they do in fact login to the server on my desk sometimes... only to be bored to death after two seconds because "there's only this black and white thingy there's not even a mouse".
|
Hello,
Let's hope they all will be bored very soon when they login and that you don't have a wannabee script kiddie in your class as already indicated by caduqued.
Kind regards,
Eric
|
|
|
|
09-18-2012, 07:40 AM
|
#9
|
|
LQ Newbie
Registered: Aug 2012
Location: Ryomgård, Danmark
Distribution: Slackware
Posts: 24
Rep: 
|
To prevent login by xdm. kdm, you can test on $DISPLAY and $USER in the Xsession file,
and then just exit if you do not like the combination of the two variables.
Be sure you have the exact value of the DISPLAY variable,
and then if $DISPLAY is ":0.0" put something like this quite early in the Xsession file:
# Exit if user not allowed
if [ "x$DISPLAY" = "x:0.0" -a "$USER" != "kiki" ]; then
exit
fi
And also you have to prevent login on the virtual console.
Last edited by ml4711; 09-18-2012 at 07:42 AM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:47 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|