[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

AUTOMOUNT and SMBFS: A few questions



Hi,
I had automount with SMBFS working with Suse, now I have installed Sarge and cannnot get it to work.

In /etc/auto.master

#/misc	/etc/auto.misc --timeout=60
/smb 	/etc/auto.smb -v -d
#/misc	/etc/auto.misc
#/net	/etc/auto.net


In /etc/auto.smb (all on one line):

test   -fstype=smbfs,username=X,password=X   ://192.168.123.252/brian


ls /smb/test

Oct 17 11:38:17 localhost automount[1181]: attempting to mount entry /smb/test
Oct 17 11:38:17 localhost automount[1932]: lookup(program): looking up test
Oct 17 11:38:17 localhost automount[1932]: lookup(program): lookup for test failed
Oct 17 11:38:17 localhost automount[1932]: failed to mount /smb/test
etc.....

If I do

mount -t smbfs -0 username=x,password=x //192.168.123.252/brian  /mnt/brian

That works perfectly.

So what exactly does the LOOKUP(program) message tell me?

Strange thing was that /etc/auto.smb had the following contents after installation:

#!/bin/bash

# $Id: auto.smb,v 1.3 2005/04/05 13:02:09 raven Exp $

# This file must be executable to work! chmod 755!

key="$1"
opts="-fstype=smbfs"

for P in /bin /sbin /usr/bin /usr/sbin
do
	if [ -x $P/smbclient ]
	then
		SMBCLIENT=$P/smbclient
		break
	fi
done

[ -x $SMBCLIENT ] || exit 1

$SMBCLIENT -gNL $key 2>/dev/null| awk -v key="$key" -v opts="$opts" -F'|' -- '
	BEGIN	{ ORS=""; first=1 }
/Disk/ { if (first) { print opts; first=0 }; print " \\\n\t /" $2, "://" key "/" $2 }
	END 	{ if (!first) print "\n"; else exit 1 }
	'

So I removed that and replaced it with the "normal" looking line!


Cheers Brian



Reply to: