Author Topic: How to mount a network drive at login from linux clients  (Read 1040 times)

basselope

  • Zen Monk
  • **
  • Posts: 56
  • Karma: +15/-0
    • View Profile
How to mount a network drive at login from linux clients
« on: July 16, 2018, 06:29:38 pm »
Hello,

I have a Zentyal 5.1 domain and my clients are a mix of Windows 10 and Ubuntu 18.05.

They all work on a main file server - a freeNAS device joined to the Zentyal domain.

I have been looking into ways to automate mounting the network drive from the Linux clients, but the solutions I found involve local scripts containing password in clear and in need of updating when the credentials change - a no-go for me.

How should I go about using Zentyal to do this instead? I need the clients at login to mount a CIFS share  that is using the domain permissions and is on a server that is not the domain controller.


basselope

  • Zen Monk
  • **
  • Posts: 56
  • Karma: +15/-0
    • View Profile
Re: How to mount a network drive at login from linux clients
« Reply #1 on: September 11, 2018, 03:23:05 pm »
*BUMP*

Anyone has any direct experience with the suggestions here?

https://askubuntu.com/questions/1026316/cifs-mounts-and-kerberos-permissions-on-access-or-best-practice

The users' homes are correctly connected by Zentyal on client login, but I want them to be mounting automatically a CIFS share on our LAN. This share is managed by FreeNAS and set to authenticate users against the Zentyal domain.

Sand_man

  • Zen Samurai
  • ****
  • Posts: 272
  • Karma: +17/-0
    • View Profile
Re: How to mount a network drive at login from linux clients
« Reply #2 on: September 12, 2018, 02:41:27 pm »
May be pam-mount? (my English is poor))

Install libpam-mount and cifs-utils, then edit /etc/security/pam_mount.conf.xml:
add in section "<!-- Volume definitions -->" strings with you shares, etc:
Code: [Select]
<volume user="*" fstype="cifs" server="10.10.10.10" path="cure" mountpoint="/home/%(DOMAIN_USER)/Врачи" />where 10.10.10.10 replace with you server IP