LinHES Forums
http://forum.linhes.org/

Autofs samba issues
http://forum.linhes.org/viewtopic.php?f=5&t=11112
Page 1 of 1

Author:  tuckie [ Tue Aug 08, 2006 10:18 pm ]
Post subject:  Autofs samba issues

I've been trying all night to get autofs working with samba using this guide: http://www.knoppmythwiki.org/index.php? ... +and+samba

...and haven't had any luck.

This is my /etc/auto.master file:
Code:
# $Id: auto.master,v 1.2 1997/10/06 21:52:03 hpa Exp $
# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(5).
# /var/autofs/misc      /etc/auto.misc
# /var/autofs/net               /etc/auto.net
# KNOPPIX automounts for floppy and cdrom(s), see knoppix-autoconfig
/mnt/auto     /etc/auto.mnt   --timeout=2
/var/autofs/usb /etc/auto.usb   --timeout=2
#/mnt/auto       /etc/automount.sh       --timeout=2
/myth /etc/auto.samba.mnt --timeout=2 --ghost

This is my /etc/auto.samba.mnt file:
Code:
music -fstype=smbfs,credentials=/home/mythtv/.smbpassword ://xpBox/Music


This is my /home/mythtv/.smbpassword file:
Code:
username=myth
password=myth


Lastly I have done:
Code:
/etc/init.d/autofs start
update-rc.d autofs defaults

as well as restarting the computer multiple times.
Now, this line works fine for me (after creating the /myth/music folder):
Code:
smbmount '\\xpBox\Music' /myth/music -o username=myth,password=myth

Does anyone have any ideas? (and is there any way to view a log file of some sort for autofs?)

Author:  spalVl [ Wed Aug 09, 2006 5:26 am ]
Post subject: 

1 Issue.

autofs won't mount if a directory already existing (/myth in this case)

Change in auto.master

Code:
/myth /etc/auto.samba.mnt --timeout=2 --ghost

to
Code:
/myth/music/network /etc/auto.samba.mnt --timeout=2 --ghost


Do not create network directory, autofs will automatically create /myth/music/network/music directory.

Personally what I do is automount my shares to /mnt/ and them symlink to mounts.


/etc/auto.master

Code:
mnt/network /etc/auto.samba.mnt --timeout=2 --ghost

/etc/auto.samba.mnt
Code:
win-media fstype=smbfs,credentials=/home/mythtv/.smbpassword ://192.168.0.100/My_Media

Code:
#Add username/password to /home/mythtv/.smbpassword
echo username=mythtv >> /home/mythtv/.smbpassword
echo password=mythtv >> /home/mythtv/.smbpassword

#Stop & Start autofs
/etc/init.d/autofs stop
/etc/init.d/autofs start

#Create links in appropiate directory for media shares
ln -s /mnt/network/win-media/pictures /myth/gallery/win-media-pictures
ln -s /mnt/network/win-media/music /myth/music/win-media-music
ln -s /mnt/network/win-media/video /myth/music/win-media-video

Author:  tuckie [ Wed Aug 09, 2006 6:19 am ]
Post subject: 

Actually, I only created that music folder when testing that last manual mount command. For most of the time that I spent banging my head I had the music folder removed.

Author:  spalVl [ Wed Aug 09, 2006 8:47 am ]
Post subject: 

Quote:
Actually, I only created that music folder when testing that last manual mount command. For most of the time that I spent banging my head I had the music folder removed.


It is the /myth folder that cannot exist given your auto.master file. Which probably is not a good idea to delete /myth as it holds the media and more for MythTV.

make your auto.master file

Code:
/myth/music/network /etc/auto.samba.mnt --timeout=2 --ghost


specify any directory that does NOT exist.

Author:  tuckie [ Wed Aug 09, 2006 10:29 am ]
Post subject: 

:oops: I gotya, I think I will go the symlink route. Thanks for all of your help :)

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/