[Samba] Fwd: Automatic mapping shares on logon time

Yvan Masson yvan at masson-informatique.fr
Tue Sep 15 08:01:18 UTC 2020

See answer at the bottom.

Le 14/09/2020 à 15:56, jmpatagonia via samba a écrit :
> Yes sorry for my mistake, we need map share folders that the user have
> permission, at logon time on Linux Desktop User.
> And if for example a user change of departament or area, the shares change,
> so we change the maps shares folders on logon.
> On Windows users is easy like GPO o logon script but on Linux Desktop Users
> is more complex i think.
> regards.
> ---------- Forwarded message ---------
> De: jmpatagonia <jmpatagonia at gmail.com>
> Date: lun., 14 sept. 2020 a las 10:47
> Subject: Re: [Samba] Automatic mapping shares on logon time
> To: <samba at lists.samba.org>
> Sorry for my mistake, this work for linux users Right??
> We just need logon script for linux users for Windows users we have.
> El lun., 14 sept. 2020 a las 10:37, Carlos Jesus (<camjesus2 at gmail.com>)
> escribió:
>> Hey,
>> You need to create a GPO.
>> There's a very good description here:
>> https://activedirectorypro.com/map-network-drives-with-group-policy/
>> You can map drive per user, per group or a combination, with or without
>> exclusions.
>> There is a mistake in the article; you should use %LogonUser% instead of
>> %username%.
>> Best regards
>> jmpatagonia via samba <samba at lists.samba.org> escreveu no dia segunda,
>> 14/09/2020 à(s) 14:22:
>>> Hello we are testing samba 4.11.2 and we try automatic mapping shares
>>> folders for users that their have permissions on fileserver, on the logon
>>> time, like logon script on Windows.
>>> Any have a method to do this ?
>>> I explain, instead of the user go to "File Browser" and navigate and map
>>> the share folders on the fileserver, we try to automatic map this folders
>>> on logon time.
>>> regards.
>>> PD: We thinking in a complex method where the user guest the built-in
>>> samba4 ldap (ldap serach) for your groups and according the groups that
>>> their have mapping the file sharing with gvfs-mount, because we
>>> implemented
>>> the pair same group-namex-share-namex.
>>> --
>>> To unsubscribe from this list go to the following URL and read the
>>> instructions:  https://lists.samba.org/mailman/options/samba


I think you have two solutions:
- using a custom script that runs on user login to query LDAP for 
appropriate shares an which then uses "gio mount". Very flexible, 
however gio is a user space mount, so bandwidth limited (I did that for 
a school and it was working)
- using pam_mount.conf (/etc/security/pam_mount.conf.xml in Debian), 
which I now think is the best solution. Read the man page for more 
information and examples


More information about the samba mailing list