LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-13-2014, 03:16 AM   #1
linuxmonster
LQ Newbie
 
Registered: Apr 2014
Posts: 1

Rep: Reputation: Disabled
NFS 4 with kerberos mount by principal


Hello,
Im trying to setup a multiuser environment booting from network.
The system is self distro based on Ubuntu debootstrap
I want to use nfs 4 with Kerberos to make the client machines authenticated so I'll know who is mounting the system.
I also want only the home folder of the user to be mounted so he wont be able to read the other home folders of other users and that way I can make sure that even if the system will be exploited and the user will get root access he will not get access to the entire file system.

I was thinking of doing this inside the initramfs, before mounting the file system I will get the Kerberos principal ticket and then mount the root file system as read only, using a keytab, and the user's home folder with the principal Kerberos ticket that I just obtained.

The problem, I cant figure out how to make the NFS export line to allow mounting only with a principal. Is there anyone who managed to use the netgroups that way? Or any other way to do that?
I think exports is ignoring the second and third fields of the netgroup file so they only take the host name from it

from the exports man:
“NIS netgroups may be given as @group. Only the host part of each netgroup members is consider in checking for membership. Empty host parts or those containing a single dash (-) are ignored.”

But then there is no other way to do that?

Thank you for the help.
 
Old 04-15-2014, 06:48 AM   #2
raubvogel
LQ Newbie
 
Registered: Jan 2014
Posts: 7

Rep: Reputation: Disabled
How are you exporting the shares?

I use autofs (auto_home/auto.home) to mount the user home directories once they are authenticated by kerberos.
 
Old 04-20-2014, 08:07 PM   #3
Bigtwin
LQ Newbie
 
Registered: Feb 2013
Posts: 5

Rep: Reputation: Disabled
Indeed, nfs exports is not the way to go. You can limit acces to a group, but you can not limit access to the users home dir, hence, all users get access to everybodies home dir. That is not what you want I guess.

Through autofs, you can make, on the user side, automount his/hers specific home dir. Google something like "linux automount home dir" and find the auto.master auto.homedir config file. Especially the line in the config file ending with an "&" does the trick.

Last edited by Bigtwin; 04-20-2014 at 08:08 PM.
 
  


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
[SOLVED] Wrong principal in request (Kerberos/GSSAPI/ssh/Debian) Toomas Linux - Server 1 01-04-2012 06:30 AM
Ubuntu Server - 10.04.03 - NFS export with Kerberos (MIT) - NFS Won't Start tekkon7 Linux - Server 2 11-07-2011 09:53 AM
mount.nfs: mount to NFS server 'jesse' failed: timed out, retrying keupie Linux - Networking 3 06-05-2009 07:03 PM
NFS mount mount.nfs: access denied by server while mounting knockout_artist Linux - Newbie 2 11-26-2008 02:36 PM
Cannot delete expired principal from kerberos system, how delete principals in kerber sarajevo Linux - Security 0 10-19-2007 11:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:18 PM.

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