[Samba] Using GPO to mount shares on Linux

L.P.H. van Belle belle at bazuin.nl
Wed Oct 11 09:11:12 UTC 2017


Automounts can be setup in different ways. 

This is how i mount my homedir over nfsv4 with systemd. 
( nothing in fstab ) 

For cifs, change the Type and Options in te .mount file. 
And make sure cifs-utils is installed on the servers.

File1: home-users.mount 
[Unit]
Description=User Homes

[Mount]
What=NFSSERVER.FQDN:/users
Where=/path_to/users
Type=nfs4
Options=sec=krb5,nfsvers=4.1

TimeoutSec=150

[Install]
WantedBy=multi-user.target

File2: home-users.automount 
[Unit]
Description=Automount Home-Users

[Automount]
Where=/home/users

[Install]
WantedBy=multi-user.target

# and reload and enable 
Systemctl daemon-reload
systemctl enable home-users.automount 
systemctl start home-users.automount 


An extra tip, i found in some forums. 
If you use cifs, you may need to configure krb5.conf also by adding the following. 
; for Windows 2003
;    default_tgs_enctypes = rc4-hmac des-cbc-crc des-cbc-md5
;    default_tkt_enctypes = rc4-hmac des-cbc-crc des-cbc-md5
;    permitted_enctypes = rc4-hmac des-cbc-crc des-cbc-md5

; for Windows 2008 with AES
    default_tgs_enctypes = aes128-cts-hmac-sha1-96 aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
    default_tkt_enctypes = aes128-cts-hmac-sha1-96 aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
    permitted_enctypes = aes128-cts-hmac-sha1-96 aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5


Greetz, 

Louis



> -----Oorspronkelijk bericht-----
> Van: samba [mailto:samba-bounces at lists.samba.org] Namens 
> Daniel Carrasco via samba
> Verzonden: woensdag 11 oktober 2017 10:38
> Aan: samba at lists.samba.org
> Onderwerp: Re: [Samba] Using GPO to mount shares on Linux
> 
> Yeah, I mean an Ubuntu 16.04 client mounting a Linux Samba 
> shares on a Debian 8 server depending of user groups. Both 
> connected as members servers to a Samba 4 DC.
> 
> I'll research about how automounting works.
> 
> Thanks!!
> 
> 2017-10-11 10:13 GMT+02:00 L.P.H. van Belle via samba 
> <samba at lists.samba.org
> >:
> 
> > If you mean, Linux <=> Linux , use automounting, of 
> dedicated mounts.
> > Cifs/nfs, depending on you setup and what you need.
> >
> >
> > > -----Oorspronkelijk bericht-----
> > > Van: samba [mailto:samba-bounces at lists.samba.org] Namens Daniel 
> > > Carrasco via samba
> > > Verzonden: woensdag 11 oktober 2017 9:33
> > > Aan: samba at lists.samba.org
> > > Onderwerp: [Samba] Using GPO to mount shares on Linux
> > >
> > > Hello,
> > >
> > > I'm using a Samba 4 as domain server and I've a lot of Windows 
> > > computers that mounts shared drives on another server through GPO 
> > > applied by user groups.
> > > Is there any way to do something similar on a Linux box, 
> or I've to 
> > > use a local script?
> > >
> > > Thanks!
> > >
> > > --
> > > _________________________________________
> > >
> > >       Daniel Carrasco Marín
> > >       Ingeniería para la Innovación i2TIC, S.L.
> > >       Tlf:  +34 911 12 32 84 Ext: 223
> > >       www.i2tic.com
> > > _________________________________________
> > > --
> > > To unsubscribe from this list go to the following URL and read the
> > > instructions:  https://lists.samba.org/mailman/options/samba
> > >
> >
> >
> > --
> > To unsubscribe from this list go to the following URL and read the
> > instructions:  https://lists.samba.org/mailman/options/samba
> 
> 
> 
> 
> --
> _________________________________________
> 
>       Daniel Carrasco Marín
>       Ingeniería para la Innovación i2TIC, S.L.
>       Tlf:  +34 911 12 32 84 Ext: 223
>       www.i2tic.com
> _________________________________________
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
> 




More information about the samba-technical mailing list