auto.smb (null) and other issues
Hi,
I have come across some issues when try automount samba shares using auto.smb on fedora core 5.
I had to
1)Uncomment the smb section in auto.master
2)Add hostnames to /etc/hosts to do hostname to ip translation
Then to solve some problems I had to 3)change the opts line in auto.smb to read opts="-fstype=cifs" 4)apply one line patch to auto.smb to allow the system to read shares with spaces - /Disk/ { if (first) { print opts; first=0 }; print " \\\n\t /" $2, "://" key "/" $2 } + /Disk/ { if (first) { print opts; first=0 }; sub(/ /, "\\ ", $2); print " \\\n\t /" $2, "://" key "/" $2 }
Now the real problem is this, when I cd /smb/sigma the shares mount fine (i check ed the logfile).
However WHEN I do an ls -l i get a (null) entry in the listing. Why is this here?
$ ll total 0 drwxrwxrwx 1 root root 0 Apr 3 16:48 music dr-xr-xr-x 8 root root 0 Apr 26 18:13 (null) drwxrwxrwx 1 root root 0 Mar 29 2005 XLNX ..etc
AND now taking a look in the debug log file I have this entry...for some reason it is trying to mount everthing in /smb/sigma into /smb/sigma/(null)/ which of course fails, with lots of error messages.
automount[1661]: handle_packet_missing: token 2, name sigma/(null) automount[1661]: attempting to mount entry /smb/sigma/(null) automount[2279]: lookup(program): looking up sigma/(null) automount[2279]: lookup(program): sigma/(null) -> -fstype=cifs /XLNX ://sigma/(null)/XLNX /My\ Videos ://sigma/(null)/My\ Videos /music ://sigma/(null)/music /Incoming ://sigma/(null)/Incoming automount[2279]: parse(sun): expanded entry: -fstype=cifs /XLNX ://sigma/(null)/XLNX /My\ Videos ://sigma/(null)/My\ Videos /music ://sigma/(null)/music /Incoming ://sigma/(null)/Incoming aopen automount[2279]: parse(sun): dequote("fstype=cifs") -> fstype=cifs aopen automount[2279]: parse(sun): gathered options: fstype=cifs [lots of inevitable error messages not shown]
THEN it tries to do everthing in /smb/sigma into /smb/sigma/(null)/mls/!!! The mls would most likely have something to do with the ls command that I used to get a directory listing
automount[1661]: handle_packet_missing: token 3, name sigma/(null)/mls automount[1661]: attempting to mount entry /smb/sigma/(null)/mls automount[2291]: lookup(program): looking up sigma/(null)/mls automount[2291]: lookup(program): sigma/(null)/mls -> -fstype=cifs /XLNX ://sigma/(null)/mls/XLNX /My\ Videos ://sigma/(null)/mls/My\ Videos /music ://sigma/(null)/mls/music /Incoming ://sigma/(null)/mls/Incoming automount[2291]: parse(sun): expanded entry: -fstype=cifs /XLNX ://sigma/(null)/mls/XLNX /My\ Videos ://sigma/(null)/mls/My\ Videos /music ://sigma/(null)/mls/music /Incoming ://sigma/(null)/mls/Incoming automount[2291]: parse(sun): dequote("fstype=cifs") -> fstype=cifs
Why does the automounter create a (null) folder, and then why does it try and mount stuff inside the (null)/ and (null)/mls/ folder after doing a directory listing on the hostname
Also, can points 3 and 4 above be fixed in the default auto.smb script distributed.
cheers,
Neil
[me@aopen ~]$ cat /etc/auto.smb
#!/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=cifs"
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 }; sub(/ /, "\\ ", $2);
print " \\\n\t /" $2, "://" key "/" $2 }
END { if (!first) print "\n"; else exit 1 }
'Ian Kent
maintainerQuoted 8 lines · On Thu, 27 Apr 2006, [email protected] wrote:
Hi,
I have come across some issues when try automount samba shares using auto.smb on fedora core 5.
I had to
1)Uncomment the smb section in auto.master
2)Add hostnames to/etc/hoststo do hostname to ip translation
Not sure about the name translation issue but yes the system must be able to translate the names.
Quoted 6 lines
Then to solve some problems I had to 3)change the opts line in auto.smb to read opts="-fstype=cifs" 4)apply one line patch to auto.smb to allow the system to read shares with spaces - /Disk/ { if (first) { print opts; first=0 }; print " \\\n\t /" $2, "://" key "/" $2 } + /Disk/ { if (first) { print opts; first=0 };
sub(/ /, "\\ ", $2); print " \\\n\t /" $2, "://" key "/" $2 }
I'm aware of the cifs issue.
I believe that support for smbfs mounts has been removed in favour of cifs. There should be a fix for this sometime soon.
Quoted 6 lines
Now the real problem is this, when I cd /smb/sigma the shares mount fine (i check ed the logfile).
However WHEN I do an ls -l i get a (null) entry in the listing. Why is this here?
Yes. I've just upgraded to FC5 myself and I'm also seeing this. I've spent some time trying to work out what's going on but haven't been able to nail it yet.
You may also see a remount happen immediately after a mount has expired.
So far it appears this may be due to the hal package. I'm persuing that as well.
Quoted 3 lines
Also, can points 3 and 4 above be fixed in the default auto.smb script distributed.
Yes. Should be part of the update.
Ian