You are not logged in.

#1 2014-01-03 20:16:16

wolfdogg
Member
From: Portland, OR, USA
Registered: 2011-05-21
Posts: 545

autofs for samba mount workaround

i wasnt able to get autofs to work with samba at all today. 

i at first tried to use the auto.smb template, but since its not documented in the wiki, i couldnt figure it out.  i did find this link that shed some light on it http://ubuntuforums.org/showthread.php?t=885713 but still no workie.

then i tried to follow the autofs wiki for the automount using samba, and that wouldnt work either.  i am on a domain, but tried all the possible combinations i could think of with straight hard coded password and username and couldnt even get that to work, then i tried to simply mount a public share that doesnt need creds using this samba method but that wouldnt work either. 

in the end i had to create an fstab entry to mount it, using a separate credentials file chmodded to 600.  whats up with autofs and samba? 

can anybody tell me the way they were able to work this out?

some caveats that may stand out to someone who is more familiar with this;

my hostname has a hyphen in it, e.g. hostname-100 so as i mentioned above about all the combinations, those included several with //hostname\-100/share which didnt work.  also, im on an internal domain so i tried all those combinations with

 //hostname-100.americas.domain.pvt/share 

and

 //hostname\-100.americas.domain.pvt/

share as well,
i also tried

 username=DOMAIN\user 

and

username=DOMAIN\\user

and

username-user,domain=DOMAIN

and in credentials file when i was using that i tried

username=user
password=pass
domain=DOMAIN

and again with the domain entry, and again like this

username=DOMAIN\user
password=pass

and again like this

username=DOMAIN\\user
password=pass

in the end i had to go with

#/etc/fstab
//hostname-100.americas.domain.pvt/backup /mnt/smb/hostname-100/backup cifs credentials=/path/to/creds/hostname-100 0 0

Last edited by wolfdogg (2014-01-03 20:20:09)


Node.js, PHP Software Architect and Engineer (Full-Stack/DevOps)
GitHub  | LinkedIn

Offline

Board footer

Powered by FluxBB