LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-08-2003, 04:16 PM   #1
acb67
Member
 
Registered: Jun 2002
Posts: 50

Rep: Reputation: 15
NFS security problem --> too much power for root


Hi all,

I have hit a wall trying to find a solution for this NFS security problem. We currently have multiple Linux servers with users automounting their /home via autofs through LDAP. The problem we have is that if someone has a root password on their local machine, they can get into anyone's /home folder since it is mapped through the autofs. Is there anyway around this? I looked into no_root_squash and such, but ran into problems when I set the /etc/exports to root_squash.

Also, I have heard something about Secure NFS. Has anyone heard of this? What does it do? Could it possibly solve this file sharing problem?

Thanks!
 
Old 12-08-2003, 04:22 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
what sort of problems with root_squash? that's exactly where you want to go.... if you mean you need root squash off for certain machines, you can export the same directory twice with nfs, jsut to different people / machines with different rights
 
Old 12-09-2003, 09:11 AM   #3
acb67
Member
 
Registered: Jun 2002
Posts: 50

Original Poster
Rep: Reputation: 15
Yes, that was the problem with root_squash, and what you say does solve the problem. I forgot about that. Thanks. But we still have another problem, still related to the root power and NFS.

On our NFS home server, I have changed all the permissions of user folders to 700. Therefore, only the owner can read his/her files. The problem is that if someone has the root password to their machine, they could su to root, and then from root su to any user and access those user's files. When you are root and you su to a user, you are not prompted for a password. Is there any way around this? As I said before, I have heard something about Secure NFS, which uses Kerberos to authenticate and NFS connection, but I'm not too sure about how it works yet. If there is any other workaround, it would be great to hear about that as well.

Thanks!
 
Old 12-09-2003, 09:46 AM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Unfortunately if a user has root access they don't need the login when su'ing to another user, that's the power of root.

You should just look into using NIS maybe. Use the central NFS server as also a means of authenticating users from one machine. That way they won't be authenticated on their local machines when logging in but from the remote server since they also have their home accounts mounted from it, etc.
 
Old 12-09-2003, 10:05 AM   #5
acb67
Member
 
Registered: Jun 2002
Posts: 50

Original Poster
Rep: Reputation: 15
It is actually a little more involved. We do not use NIS. We are authenticating against AD using Kerberos, with an LDAP server containing all user info. Eventually the plan is to phase out the LDAP server and use the Unix attributes in AD when Samba 3 is a little more stable, but for now we will stay with this. So in order to even log on to client machines, the user must be authenticated through AD. Is there a way to make NFS prompt for a password and authenticate via Kerberos or something before mount? Yes, right now, since the /home folder is exported on the NFS server, anyone can mount a folder.
 
Old 01-30-2011, 04:49 PM   #6
ealt
LQ Newbie
 
Registered: Jan 2011
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by acb67 View Post
It is actually a little more involved. We do not use NIS. We are authenticating against AD using Kerberos, with an LDAP server containing all user info. Eventually the plan is to phase out the LDAP server and use the Unix attributes in AD when Samba 3 is a little more stable, but for now we will stay with this. So in order to even log on to client machines, the user must be authenticated through AD. Is there a way to make NFS prompt for a password and authenticate via Kerberos or something before mount? Yes, right now, since the /home folder is exported on the NFS server, anyone can mount a folder.
Hi,

I am facing the same problem. We are also using openldap (not AD) for user authentication. I have found a reply at adress:

http://serverfault.com/questions/215...-in-etc-passwd

Which says:
Doesn't answer your direct question, but I think your issue is with NFS, not sudo/su - you're going to have this problem anytime you use NFSv3 as it relies on UIDs to enforce access permissions.

Even if you did somehow prevent users from switching to root and back to another UID, a malicious user could simply connect their own device or boot a different OS inplace of your specially configured system and overcome the protection.

Have you considered using NFSv4? It uses Kerberos to authenticate mount requests and enforce access permissions so wouldn't be vulnerable to this happening.
I wonder if anybody uses this kindof authentication with linux.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS security with /etc/hosts.deny supernode Linux - Security 8 10-22-2005 09:51 AM
Root-NFS Problem, urgent! liyuheu Linux - Newbie 2 08-07-2004 08:49 PM
power failure toasts startx and nfs keirobyn Linux - General 1 04-29-2002 07:07 AM
NFS - Automount / Security Issues gene_gEnie Linux - Networking 0 02-08-2002 03:05 PM
Problem mounting Root FS over NFS Amitha Linux - Software 0 02-08-2002 12:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:15 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