[linux-cifs-client] Hardcoded cifs mount works but not
automounter (autofs)
Leif Adelöw
leif at adelow.com
Tue Aug 14 13:34:52 GMT 2007
Jeff,
Thanks for your effort/time:
I've tried that aswell, but it may be a good thing to reveal the result
of such a query (for the record):
<snippet from log-file>
Aug 14 15:28:18 pole automount[16083]: >> Mounting the DFS root for
domain not implemented yetNo ip address specified and hostname not found
</snippet from log-file>
The mensioned syntax works, however, in static auto.xcip file (below)
Thanks!
Best Regard
Leif Adelöw
ww.adelow.com
On Tue, 2007-08-14 at 08:14 -0400, Jeff Layton wrote:
> On Tue, 14 Aug 2007 12:41:05 +0200
> Leif Adelöw <leif at adelow.com> wrote:
>
> > Hi,
> >
> > I have a problem with mount.cifs not beeing able to resolve NAMES (at
> > least I think I do). Any help is very much appreciated!
> >
> > Using autofs with;
> > auto.master: /xcip /etc/auto.dir/auto.xcip --timeout=60
> > auto.xcip: Measurements -
> > fstype=cifs,username=yyy,password=xxx,file_mode=0644,dir_mode=0755,uid=leif,gid=users,iocharset=utf8 ://xcip/Measurements
> >
> > works but not
> >
> > auto.master: /cifs program:/etc/auto.dir/auto.cifs --timeout=60
> > auto.cifs:
> > --<auto.cifs>
> > #!/bin/bash
> > # $Id$
> > # This file must be executable to work! chmod 755!
> > key="$1"
> > mountopts="-fstype=cifs,file_mode=0644,dir_mode=0755,uid=user,gid=users"
> > smbclientopts=""
> > for P in /bin /sbin /usr/bin /usr/sbin /usr/local/samba/bin/
> > do
> > if [ -x $P/smbclient ]
> > then
> > SMBCLIENT=$P/smbclient
> > break
> > fi
> > done
> > [ -x $SMBCLIENT ] || exit 1
> >
> > mountopts=$mountopts",username=yyy,password=xxx"
> > smbclientopts="-Uyyy%xxx"
> >
> > $SMBCLIENT $smbclientopts -gL $key 2>/dev/null \
> > | awk -v key="$key" -v opts="$mountopts" -F'|' -- '
> > BEGIN { ORS=""; first=1 }
> > /Disk/ { if (first) { print opts; first=0 };
> > sub(/ /, "\\ ", $2);
> > print " \\\n\t /" $2,"://" key "/" $2 }
> > END { if (!first) print "\n"; else exit 1 }
> > '
> >
> > --</auto.cifs>
> >
> > $/etc/auto.dir/auto.cifs xcip
> > gives:
> > ----------------------------------------------------
> > -
> > fstype=cifs,file_mode=0644,dir_mode=0755,uid=user,gid=users,username=yyy,password=xxx\
> > /D$ ://xcip/D$ \
> > /mxccomtest ://xcip/mxccomtest \
> > /NUUS2002\ (E) ://xcip/NUUS2002\ (E) \
> > /temp ://xcip/temp \
> > /ADMIN$ ://xcip/ADMIN$ \
> > /Source ://xcip/Source \
> > /C$ ://xcip/C$ \
> > /Measurements ://xcip/Measurements
>
> Maybe I'm wrong, but the ":" in the right hand side here looks strange.
> Maybe you need to alter your script so they don't appear? I think they
> should look something like:
>
> /Measurements //xcip/Measurements
>
More information about the linux-cifs-client
mailing list