Author Topic: [SOLVED] Mounting /home directories from Zentyal server on linux desktops?  (Read 18599 times)

calummuir

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
I notice that when I set everything up with the LDAP and install zentyal-desktop on ubuntu LTS the home directory is that of a local file system (i.e on the client as to the server.)

How do I get the /home/useraccount on the Zentyal server to automatically be used in the Ubuntu LTS Client boxes?

How is this possible?

Any answers would be great.

The File Sharing section in Zentyal seems more geared towards Windows and general sharing yet I know there is an answer to this, I just don't know it.

Couldn't find anything on the forum. As I said, any help would be greatly appreciated.

Thanks
Calum

UPDATE::::

I sort of used the libpam-mt which was recommended, but I used the one on the https://help.ubuntu.com/community/SingleSignOn#Shared_Files site

used this:

<volume fstype="fuse" path="sshfs#%(USER)@slave1.brainvitamins.net:/home/%(USER)/shared" mountpoint="~/Shared/" options="workaround=rename" />
« Last Edit: February 13, 2012, 10:22:24 pm by calummuir »

majestyx

  • Board Moderator
  • Zen Warrior
  • *****
  • Posts: 243
  • Karma: +8/-1
  • Dont feed the Troll !
    • View Profile
    • German FSFE Blog
Re: Mounting /home directories from Zentyal server on linux desktops?
« Reply #1 on: January 21, 2012, 12:24:27 pm »
i only can imagine this for my:

1. give the folder /home (on zentyal) exactly the same user/group rights as the /home/$userfolder
2. go to your Linux Client and edit the fstab to mount the /home folders from zentyal

i imagine too: on this client you can see/use all user folders under /home ?! maybe you can post it here?!

-- works4me --
if i set up linux clients whit his own /home folder - i use smb browse (difficulty in many distros) or the absolute file path. after login i set a bookmark in nautlilus/PCManFM
Ahoi
Michael (majestyx) pls, applaud if I could help ;)
--
Erst lesen, dann schreiben: http://forum.zentyal.org/index.php/topic,4317.0.html

Zentyal Doku: http://doc.zentyal.org/en/zindex.html (engl.)

kg66

  • Zen Apprentice
  • *
  • Posts: 32
  • Karma: +2/-0
    • View Profile
Re: Mounting /home directories from Zentyal server on linux desktops?
« Reply #2 on: January 21, 2012, 01:17:14 pm »
Open the following URL in nautilus

smb://Host.name/username

please replace Host.name with the hostname or IP-address of your Server. Username is the Users Account
name. Now you are redirected to your home Directory on the zentyalserver.

You can store this URL as a Bookmark in nautilus.

UdoB

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +17/-0
    • View Profile
Re: Mounting /home directories from Zentyal server on linux desktops?
« Reply #3 on: January 22, 2012, 12:13:03 pm »
How do I get the /home/useraccount on the Zentyal server to automatically be used in the Ubuntu LTS Client boxes?

Authentication does already work? Then install the standard package libpam-mount and edit /etc/security/pam_mount.conf.xml to include something like
Code: [Select]
                <!-- Volume definitions -->
  <volume user="*" fstype="cifs" server="10.1.4.1" path="%(DOMAIN_USER)" mountpoint="/home/%(DOMAIN_USER)" options="sec=ntlm,nodev,nosuid" />
  <volume user="*" fstype="cifs" server="10.1.4.1" path="temp" mountpoint="/home/%(DOMAIN_USER)/SRV/temp"     options="sec=ntlm,nodev,nosuid" />

Works for me on Oneiric clients. If I remember correctly I had some problems with Lucid though. YMMV!

Best regards
Udo
Udo

calummuir

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Mounting /home directories from Zentyal server on linux desktops?
« Reply #4 on: January 22, 2012, 02:10:05 pm »
Still not getting anywhere with this. The last two replies seemed quite promising but neither worked.

This is still unsolved.

Not really sure what to do/try in order to  get this working. Any ideas anyone?

Update: trying oneiric desktop with zentyal server iso in virtualbox before taking any drastic actions with anything. Hopefully it should work. Trying the last idea posted. Thanks
« Last Edit: January 22, 2012, 02:35:50 pm by calummuir »

calummuir

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Mounting /home directories from Zentyal server on linux desktops?
« Reply #5 on: January 22, 2012, 03:49:41 pm »
Do you think NFS would work?

As in: https://help.ubuntu.com/community/SettingUpNFSHowTo

majestyx

  • Board Moderator
  • Zen Warrior
  • *****
  • Posts: 243
  • Karma: +8/-1
  • Dont feed the Troll !
    • View Profile
    • German FSFE Blog
Re: Mounting /home directories from Zentyal server on linux desktops?
« Reply #6 on: January 22, 2012, 04:03:42 pm »
pls check yours server settings:
https://help.ubuntu.com/community/Samba/SambaServerGuide

pls, check yours client settings:
https://help.ubuntu.com/community/Samba/SambaClientGuide

if you like to use VM (Server/Service) check the network settings. My VM are allays (default virtualbox)  in a 10.x range. the most LAN settings are in the 192.x range..

pls, take a look to /var/log/samba/*.log

maybe you find "clientname" or "ip adress" logfiles  ;)

Ahoi
Michael (majestyx) pls, applaud if I could help ;)
--
Erst lesen, dann schreiben: http://forum.zentyal.org/index.php/topic,4317.0.html

Zentyal Doku: http://doc.zentyal.org/en/zindex.html (engl.)

majestyx

  • Board Moderator
  • Zen Warrior
  • *****
  • Posts: 243
  • Karma: +8/-1
  • Dont feed the Troll !
    • View Profile
    • German FSFE Blog
Re: Mounting /home directories from Zentyal server on linux desktops?
« Reply #7 on: January 22, 2012, 04:06:37 pm »
Do you think NFS would work?

As in: https://help.ubuntu.com/community/SettingUpNFSHowTo

you have read this?

Quote
NFS is perfect for a NAS (Networked Attached Storage) deployment in a Linux/Unix environment. It is a native Linux/Unix protocol as opposed to Samba

 ;)

Ahoi
Michael (majestyx) pls, applaud if I could help ;)
--
Erst lesen, dann schreiben: http://forum.zentyal.org/index.php/topic,4317.0.html

Zentyal Doku: http://doc.zentyal.org/en/zindex.html (engl.)

calummuir

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Mounting /home directories from Zentyal server on linux desktops?
« Reply #8 on: January 22, 2012, 04:50:57 pm »
My bad, I hadn't read the documentation properly. Basically, I need to enable roaming profiles but yet I still cannot mount the /home directory on the client box.

Basically, when I enable roaming profiles and so on, it *should* mount the /home directory from the server on the client end yet this still does not happen. I am asked a few things about SSH keys and so on.

I'm following the steps here: http://trac.zentyal.org/wiki/Documentation/Community/ZentyalDesktop/Ubuntu

yet still not getting anywhere :S

stuartiannaylor

  • Guest
Re: Mounting /home directories from Zentyal server on linux desktops?
« Reply #9 on: January 23, 2012, 09:52:13 am »
Authentication does already work? Then install the standard package libpam-mount and edit /etc/security/pam_mount.conf.xml to include something like
Code: [Select]
                <!-- Volume definitions -->
  <volume user="*" fstype="cifs" server="10.1.4.1" path="%(DOMAIN_USER)" mountpoint="/home/%(DOMAIN_USER)" options="sec=ntlm,nodev,nosuid" />
  <volume user="*" fstype="cifs" server="10.1.4.1" path="temp" mountpoint="/home/%(DOMAIN_USER)/SRV/temp"     options="sec=ntlm,nodev,nosuid" />

Works for me on Oneiric clients. If I remember correctly I had some problems with Lucid though. YMMV!

Best regards
Udo

Udo I just wanted to ask you a question that I was unsure about. I think it was ichat that pointed out that if you add an entry to fstab then this is a boot mechanism and if users log on as a different users then they have access to the original users home directory?

I guess the method you mentioned at PAM so the previous shouldn't be the case?
It doesn't work on 10.04 LTS clients?

ichat

  • Zen Hero
  • *****
  • Posts: 795
  • Karma: +28/-16
  • RTFM!
    • View Profile
Re: Mounting /home directories from Zentyal server on linux desktops?
« Reply #10 on: January 23, 2012, 01:40:23 pm »
enable the roaming profiles  in zentyal this than use   a login script to  enable FUSE  mounting your  /home/username directory.

this will al be default once a first  zentyal desktop package  is released and wil be part of  zentyal  3.0

in the mean time:   google for   fusesmb   or  autofs   both should be able to solve your problems.
All tips hints and advices are based on my personal experience.
As I try my best to be as accurate as possible, following my advice is always at your own risk,
I claim absolutely NO responsibility in any way!

UdoB

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +17/-0
    • View Profile
Re: Mounting /home directories from Zentyal server on linux desktops?
« Reply #11 on: January 25, 2012, 06:09:08 pm »
Udo I just wanted to ask you a question that I was unsure about. I think it was ichat that pointed out that if you add an entry to fstab then this is a boot mechanism and if users log on as a different users then they have access to the original users home directory?

I guess the method you mentioned at PAM so the previous shouldn't be the case?
My approach using pam_mount has no fstab entry. /home is basically empty. The mount points get automatically created when a user logs in for the first time. I have no local users.
(Except the one created during installation time; this $HOME exists in /home/user without being disturbed by pam_mount - there are some error messages regarding smbmount failures which I do simply ignore.)
Mounting happens during login-time. Only the specific, single $HOMEs of currently logged-in users are mounted. Users can not access their neighbors directories due to the usual accress restrictions. Local root can access them though.

It doesn't work on 10.04 LTS clients?
As far as I remember: it did work. But I had problems with logging in on X by gdm, kdm, lightdm - the login process hang. Sometimes. Logging in at the console did work correctly. I never managed to drill down to the real reason for this one. Actually this bug bites me again now on Oneiric, so this malfunction is not bound to Lucid but to the graphical login mechanism by itself. Currently I do login to the console and then do startxfce4...

Best regards
Udo

stuartiannaylor

  • Guest
Re: Mounting /home directories from Zentyal server on linux desktops?
« Reply #12 on: January 25, 2012, 08:04:06 pm »
Thanks Udo.

http://www.zdnetasia.com/using-pammount-to-automount-filesystems-at-login-62049948.htm

Mentions about pam.gdm and pammount it might be why you have your problems.

Thanks for the info as from the above you can see it has been of interest.

Ichat just a question with fuse but if the home directory is encrypted can fuse cope with that like pammount?

Stuart
« Last Edit: January 25, 2012, 08:13:02 pm by stuartiannaylor »

UdoB

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +17/-0
    • View Profile
Re: Mounting /home directories from Zentyal server on linux desktops?
« Reply #13 on: January 25, 2012, 09:48:50 pm »
Thanks Udo.

http://www.zdnetasia.com/using-pammount-to-automount-filesystems-at-login-62049948.htm

Mentions about pam.gdm and pammount it might be why you have your problems.

Thanks for the link. Both lightdm and gdm do utilize the common-[account|session|passwd] files as includes. The article shows an example from Mandriva so I'm hesitating to start a new sequence of experiments for now.

What I did not mention yet: on another Oneiric client machine the combination lightdm + Gnome classic does work flawlessly while combinations with gdm and/or Gnome/Unity fail. For me it seems that my approach is only compatible with a small number of combinations of Display Manager and selected Desktop to use. That is already strange enough, but I can add another oddity: the (mis-)behavior depends on which user I do run my test with, probably because of stored configuration data inside the user's $HOME. No, currently I do not want to create several new accounts just for testing.

Nevertheless I am happy with Zentyal - thanks to everybody working at this project!  :)

Thanks for the info as from the above you can see it has been of interest.
You're welcome.

Ichat just a question with fuse but if the home directory is encrypted can fuse cope with that like pammount?
Sorry, I have no idea.

Best regards
Udo