LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 04-13-2011, 09:22 PM   #1
rabb1t
LQ Newbie
 
Registered: Apr 2011
Posts: 2

Rep: Reputation: 0
Mounting home directories on both windows and linux


I'm trying to work out the best way to mount a share which is accessible to both windows and linux and retains the correct permissions.

I looked into using pam_mount on linux which will allow CIFS/SMBFS shares.

I found the following issues with pam_mount tho:
• “su” to a user with a home directory on a share will fail to mount the home directory unless you know the user’s password. This would cause issues for cronjobs.
• ssh’ing into a server as a user with a home directory on a share will prompt for a password to mount the home directory even with passphraseless ssh keys. This would cause issues with any automated login scripts
• You can force the ownerships of the files/directories to be owned correctly from windows to linux, but they may not be correct the other way around.

Does anyone have any better solutions?
 
Old 04-14-2011, 02:08 PM   #2
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 116Reputation: 116
I have always done this using NFS for linux clients and samba for windows clients, with both systems using the same usernames. You can then combine NFS with autofs if necessary and samba takes care of windows access controls and creation groups etc.
 
Old 04-14-2011, 04:25 PM   #3
rabb1t
LQ Newbie
 
Registered: Apr 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Do you mean you're using 2 separate shares? 1 being for windows via SMBFS and the other NFS for linux?

I'm after a single share which can be mounted on both linux and windows - with the correct ownerships etc.

I have tried using a single share and having it shared out using NFS (for linux) and SMBFS (for windows). The issue here is that the ownerships don't match up properly.
i.e Create a file on the SMBFS share from windows and then mount the NFS on linux. You can see the UID of the file doesn't match up with the UID of teh same username on linux (the windows SID is being translated to a UID on the NAS differently to how the linux server is translating the SID->UID).

Last edited by rabb1t; 04-14-2011 at 05:22 PM.
 
Old 04-14-2011, 06:45 PM   #4
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 116Reputation: 116
It has always been a problem. There was never a single share approach I found that was satisfactory. Theoretically it should work, but I never had the infrastructure at my disposal. All depends on kerberos really.

The NFS and Samba setup doesnt have direct UID mapping it's true, but the username mappings have always been sufficient for me.
 
  


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
Mounting Windows directories in Linux - SUSE - SAMBA pedroruiz Linux - Newbie 1 11-20-2009 10:23 PM
Mounting NFS home directories RexCoeus Linux - Networking 1 10-21-2008 02:22 PM
autofs nfs mounting home directories question extendedping Linux - Networking 3 01-30-2008 03:02 PM
Fedora Directory Server with pGina, mounting home directories? Exutable Linux - Server 5 11-28-2007 02:07 AM
mounting home directories from samba? tommyj27 Linux - Networking 2 08-27-2003 04:49 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

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