[Samba] AutoFS

Rowland Penny rpenny at samba.org
Fri Aug 18 10:52:08 UTC 2017


On Fri, 18 Aug 2017 11:52:51 +0200
Jeremy Guasco via samba <samba at lists.samba.org> wrote:

> Hi all,
> 
> I would like to use AutoFS on Samba but I encounter difficulties with 
> ldap entries.
> I have already add the Automount Schema from the Wiki 
> (https://wiki.samba.org/index.php/Samba_AD_schema_extensions) but I 
> can't add "auto_master" and the folowings leaf.
> 
> I tried :
> 
> dn: automountmapname=auto_master,dc=MYDOMAIN
> automountMapName: auto_master
> objectClass: automountMap
> objectClass: top
> 
> With error : "ERR: (Naming violation) "objectclass: Invalid RDN 
> 'AUTOMOUNTMAPNAME' for objectclass 'automountMap'!""
> 
> and
> 
> |dn: ou=auto.master,ou=automount,||dc=MYDOMAIN
> objectClass: top
> objectClass: automountMap
> objectClass: organizationalUnit
> ou: auto.master
> name: auto.master
> automountMapName: auto.master|
> 
> With error : ERR: (Object class violation) "objectclass: the
> objectclass 'organizationalUnit' seems to be unrelated to
> automountMap!"
> 
> Did someone succeed with AutoFs and Samba 4 ? If yes could you please 
> share your ldifs ?
> 
> Thanks
> 
> Jeremy

You need something like this:

dn: OU=automount,dc=MYDOMAIN
objectClass: top
objectClass: organizationalUnit
ou: automount
name: automount
showInAdvancedViewOnly: TRUE

dn: OU=auto.master,OU=automount,dc=MYDOMAIN
objectClass: top
objectClass: automountMap
objectClass: organizationalUnit
ou: auto.master
name: auto.master
automountMapName: auto.master

dn: CN=/shares,OU=auto.master,OU=automount,dc=MYDOMAIN
objectClass: top
objectClass: automount
objectClass: container
cn: /shares
name: /shares
automountKey: /shares
automountInformation: auto.shares

dn: OU=auto.shares,OU=automount,dc=MYDOMAIN
objectClass: top
objectClass: automountMap
objectClass: organizationalUnit
ou: auto.shares
name: auto.shares
automountMapName: auto.shares

dn: CN=dropbox,OU=auto.shares,OU=automount,dc=MYDOMAIN
objectClass: top
objectClass: automount
objectClass: container
cn: dropbox
name: dropbox
automountKey: dropbox
automountInformation: -fstype=cifs,rw,username=rowland,password=xxxxxxxxxx,uid=3001106,iocharset=utf8 ://192.168.0.2/dropbox

You then need something to extract the info from AD.

Rowland



More information about the samba mailing list