* Not correctly mount SMB shares ending in $ @ 2008-09-09 4:01 Matthew Jurgens 2008-09-10 3:49 ` Ian Kent 0 siblings, 1 reply; 13+ messages in thread From: Matthew Jurgens @ 2008-09-09 4:01 UTC (permalink / raw) To: autofs@linux.kernel.org Hi I recently upgraded to Fedora 9 and autofs-5.0.3-15.i386. I use SMB shares ending in $ quite often and have noticed that in this release they are broken. They are mounting in the wrong place. Contrast the 2 shares below, one the C share, the other the C$ share. The wrong slash is in the remote service name Autofs mounted: //xp0/C on /smb/xp0/C type cifs (rw,mand) <--- this one workes ok //xp0/C/$ on /smb/xp0/C$ type cifs (rw,mand) <----- this one is broken Manually mounted and working: //xp0/C$ on /mnt type cifs (rw,mand) ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Not correctly mount SMB shares ending in $ 2008-09-09 4:01 Not correctly mount SMB shares ending in $ Matthew Jurgens @ 2008-09-10 3:49 ` Ian Kent 2008-09-11 8:34 ` Matthew Jurgens 0 siblings, 1 reply; 13+ messages in thread From: Ian Kent @ 2008-09-10 3:49 UTC (permalink / raw) To: Matthew Jurgens; +Cc: autofs@linux.kernel.org On Tue, 2008-09-09 at 14:01 +1000, Matthew Jurgens wrote: > Hi > > I recently upgraded to Fedora 9 and autofs-5.0.3-15.i386. > I use SMB shares ending in $ quite often and have noticed that in this > release they are broken. > They are mounting in the wrong place. Contrast the 2 shares below, one > the C share, the other the C$ share. The wrong slash is in the remote > service name > > Autofs mounted: > //xp0/C on /smb/xp0/C type cifs (rw,mand) <--- this one > workes ok > //xp0/C/$ on /smb/xp0/C$ type cifs (rw,mand) <----- this one is > broken > > Manually mounted and working: > //xp0/C$ on /mnt type cifs (rw,mand) Can you post the output of the program map please. That's probably "sh /etc/auto.smb <server name>". Ian ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Not correctly mount SMB shares ending in $ 2008-09-10 3:49 ` Ian Kent @ 2008-09-11 8:34 ` Matthew Jurgens 2008-09-11 14:16 ` Ian Kent 0 siblings, 1 reply; 13+ messages in thread From: Matthew Jurgens @ 2008-09-11 8:34 UTC (permalink / raw) To: Ian Kent; +Cc: autofs@linux.kernel.org That's interesting. Identical output from a working and the failing host. From a working host: -fstype=cifs,username=USER,password=PASSWORD \ /C "://xp0/C" \ /ADMIN\$ "://xp0/ADMIN\$" \ /C\$ "://xp0/C\$" From the failing 5.0.3 host: -fstype=cifs,username=USER,password=PASSWORD \ /C "://xp0/C" \ /ADMIN\$ "://xp0/ADMIN\$" \ /C\$ "://xp0/C\$" Ian Kent wrote: > Can you post the output of the program map please. > That's probably "sh /etc/auto.smb <server name>". > > Ian > > > > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Not correctly mount SMB shares ending in $ 2008-09-11 8:34 ` Matthew Jurgens @ 2008-09-11 14:16 ` Ian Kent 2008-09-13 2:03 ` Matthew Jurgens 0 siblings, 1 reply; 13+ messages in thread From: Ian Kent @ 2008-09-11 14:16 UTC (permalink / raw) To: Matthew Jurgens; +Cc: autofs@linux.kernel.org On Thu, 2008-09-11 at 18:34 +1000, Matthew Jurgens wrote: > That's interesting. Identical output from a working and the failing host. > > From a working host: > -fstype=cifs,username=USER,password=PASSWORD \ > /C "://xp0/C" \ > /ADMIN\$ "://xp0/ADMIN\$" \ > /C\$ "://xp0/C\$" > > > From the failing 5.0.3 host: > -fstype=cifs,username=USER,password=PASSWORD \ > /C "://xp0/C" \ > /ADMIN\$ "://xp0/ADMIN\$" \ > /C\$ "://xp0/C\$" > That doesn't look quite right. It might be an out of date script, how about posting the script as well. > > Ian Kent wrote: > > Can you post the output of the program map please. > > That's probably "sh /etc/auto.smb <server name>". > > > > Ian > > > > > > > > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Not correctly mount SMB shares ending in $ 2008-09-11 14:16 ` Ian Kent @ 2008-09-13 2:03 ` Matthew Jurgens 2008-09-13 3:09 ` Ian Kent ` (2 more replies) 0 siblings, 3 replies; 13+ messages in thread From: Matthew Jurgens @ 2008-09-13 2:03 UTC (permalink / raw) To: Ian Kent; +Cc: autofs@linux.kernel.org [-- Attachment #1.1: Type: text/plain, Size: 1716 bytes --] Ok, so I updated the script to the RPM version and added the authentication parts: #!/bin/bash # This file must be executable to work! chmod 755! key="$1" # key comes is as something like a hostname eg matthew opts="-fstype=cifs,username=$SMB_USER,password=$SMB_PASSWORD" smbauthfile=/tmp/smbauth.tmp cat << EOT > $smbauthfile username=$SMB_USER password=$SMB_PASSWORD EOT 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 -A $smbauthfile -gL $key 2>/dev/null| awk -v key="$key" -v opts="$opts" -F'|' -- ' BEGIN { ORS=""; first=1 } /Disk/ { if (first) print opts; first=0 dir = $2 loc = $2 # Enclose mount dir and location in quotes # Double quote "$" in location as it is special gsub(/\$$/, "\\$", loc); print " \\\n\t \"/" dir "\"", "\"://" key "/" loc "\"" } END { if (!first) print "\n"; else exit 1 } ' Now its output is slightly different but the result is still the same -fstype=cifs,username=USER,password=PASSWORD \ "/C" "://xp0/C" \ "/ADMIN$" "://xp0/ADMIN\$" \ "/C$" "://xp0/C\$" vs the older output -fstype=cifs,username=USER,password=PASSWORD \ /C "://xp0/C" \ /ADMIN\$ "://xp0/ADMIN\$" \ /C\$ "://xp0/C\$" mount: //xp0/C/$ on /smb/xp0/C$ type cifs (rw,mand) > > That doesn't look quite right. > It might be an out of date script, how about posting the script as well > > [-- Attachment #1.2: Type: text/html, Size: 3626 bytes --] [-- Attachment #2: Type: text/plain, Size: 140 bytes --] _______________________________________________ autofs mailing list autofs@linux.kernel.org http://linux.kernel.org/mailman/listinfo/autofs ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Not correctly mount SMB shares ending in $ 2008-09-13 2:03 ` Matthew Jurgens @ 2008-09-13 3:09 ` Ian Kent 2008-09-13 12:30 ` Matthew Jurgens 2008-09-16 4:16 ` Ian Kent [not found] ` <1221539403.15861.108.camel@homebase.localnet> 2 siblings, 1 reply; 13+ messages in thread From: Ian Kent @ 2008-09-13 3:09 UTC (permalink / raw) To: Matthew Jurgens; +Cc: autofs@linux.kernel.org On Sat, 2008-09-13 at 12:03 +1000, Matthew Jurgens wrote: > Ok, so I updated the script to the RPM version and added the > authentication parts: Right, the reason the script changed was because of the "$" shares. I thought it was working ok but maybe a subsequent change to the daemon has broken it. I'll try to duplicate the problem here but a debug log would also be useful. See http://people.redhat.com/jmoyer for details. > > #!/bin/bash > > # This file must be executable to work! chmod 755! > key="$1" # key comes is as something like a hostname eg matthew > opts="-fstype=cifs,username=$SMB_USER,password=$SMB_PASSWORD" > > smbauthfile=/tmp/smbauth.tmp > cat << EOT > $smbauthfile > username=$SMB_USER > password=$SMB_PASSWORD > EOT > > 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 -A $smbauthfile -gL $key 2>/dev/null| awk -v key="$key" -v > opts="$opts" -F'|' -- ' > BEGIN { ORS=""; first=1 } > /Disk/ { > if (first) > print opts; first=0 > dir = $2 > loc = $2 > # Enclose mount dir and location in quotes > # Double quote "$" in location as it is special > gsub(/\$$/, "\\$", loc); > print " \\\n\t \"/" dir "\"", "\"://" key "/" loc > "\"" > } > END { if (!first) print "\n"; else exit 1 } > ' > > > > Now its output is slightly different but the result is still the same > -fstype=cifs,username=USER,password=PASSWORD \ > "/C" "://xp0/C" \ > "/ADMIN$" "://xp0/ADMIN\$" \ > "/C$" "://xp0/C\$" > > vs the older output > -fstype=cifs,username=USER,password=PASSWORD \ > /C "://xp0/C" \ > /ADMIN\$ "://xp0/ADMIN\$" \ > /C\$ "://xp0/C\$" > mount: > //xp0/C/$ on /smb/xp0/C$ type cifs (rw,mand) > > > > > > That doesn't look quite right. > > It might be an out of date script, how about posting the script as well > > > > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Not correctly mount SMB shares ending in $ 2008-09-13 3:09 ` Ian Kent @ 2008-09-13 12:30 ` Matthew Jurgens 2008-09-16 3:22 ` Ian Kent 2008-09-16 12:30 ` Ian Kent 0 siblings, 2 replies; 13+ messages in thread From: Matthew Jurgens @ 2008-09-13 12:30 UTC (permalink / raw) To: Ian Kent; +Cc: autofs@linux.kernel.org [-- Attachment #1.1: Type: text/plain, Size: 7121 bytes --] Debug Log: Sep 16 01:03:11 tempgw automount[17954]: st_expire: state 1 path /misc Sep 16 01:03:11 tempgw automount[17954]: expire_proc: exp_proc = 3083123600 path /misc Sep 16 01:03:11 tempgw automount[17954]: expire_cleanup: got thid 3083123600 path /misc stat 0 Sep 16 01:03:11 tempgw automount[17954]: expire_cleanup: sigchld: exp 3083123600 finished, switching from 2 to 1 Sep 16 01:03:11 tempgw automount[17954]: st_ready: st_ready(): state = 2 path /misc Sep 16 01:03:12 tempgw automount[17954]: st_expire: state 1 path /misc Sep 16 01:03:12 tempgw automount[17954]: expire_proc: exp_proc = 3083123600 path /misc Sep 16 01:03:12 tempgw automount[17954]: expire_cleanup: got thid 3083123600 path /misc stat 0 Sep 16 01:03:12 tempgw automount[17954]: expire_cleanup: sigchld: exp 3083123600 finished, switching from 2 to 1 Sep 16 01:03:12 tempgw automount[17954]: st_ready: st_ready(): state = 2 path /misc Sep 16 01:03:12 tempgw automount[17954]: handle_packet: type = 3 Sep 16 01:03:12 tempgw automount[17954]: handle_packet_missing_indirect: token 344, name xp0, request pid 17592 Sep 16 01:03:12 tempgw automount[17954]: attempting to mount entry /smb/xp0 Sep 16 01:03:12 tempgw automount[17954]: lookup_mount: lookup(program): looking up xp0 Sep 16 01:03:13 tempgw automount[17954]: lookup_mount: lookup(program): xp0 -> -fstype=cifs,username=USER,password=PASSWORD #011 /C "://xp0/C" #011 /ADMIN\$ "://xp0/ADMIN\$" #011 /C\$ "://xp0/C\$" Sep 16 01:03:13 tempgw automount[17954]: parse_mount: parse(sun): expanded entry: -fstype=cifs,username=USER,password=PASSWORD #011 /C "://xp0/C" #011 /ADMIN\$ "://xp0/ADMIN\$" #011 /C\$ "://xp0/C\$" Sep 16 01:03:13 tempgw automount[17954]: parse_mount: parse(sun): gathered options: fstype=cifs,username=USER,password=PASSWORD Sep 16 01:03:13 tempgw automount[17954]: parse_mount: parse(sun): dequote("/C") -> /C Sep 16 01:03:13 tempgw automount[17954]: parse_mapent: parse(sun): gathered options: fstype=cifs,username=USER,password=PASSWORD Sep 16 01:03:13 tempgw automount[17954]: parse_mapent: parse(sun): dequote(""://xp0/C"") -> ://xp0/C Sep 16 01:03:13 tempgw automount[17954]: add_offset_entry: parse(sun): added multi-mount offset /C -> -fstype=cifs,username=USER,password=PASSWORD ://xp0/C Sep 16 01:03:13 tempgw automount[17954]: parse_mount: parse(sun): dequote("/ADMIN\$") -> /ADMIN$ Sep 16 01:03:13 tempgw automount[17954]: parse_mapent: parse(sun): gathered options: fstype=cifs,username=USER,password=PASSWORD Sep 16 01:03:13 tempgw automount[17954]: parse_mapent: parse(sun): dequote(""://xp0/ADMIN\$"") -> ://xp0/ADMIN\$ Sep 16 01:03:13 tempgw automount[17954]: add_offset_entry: parse(sun): added multi-mount offset /ADMIN$ -> -fstype=cifs,username=USER,password=PASSWORD ://xp0/ADMIN\$ Sep 16 01:03:13 tempgw automount[17954]: parse_mount: parse(sun): dequote("/C\$") -> /C$ Sep 16 01:03:13 tempgw automount[17954]: parse_mapent: parse(sun): gathered options: fstype=cifs,username=USER,password=PASSWORD Sep 16 01:03:13 tempgw automount[17954]: parse_mapent: parse(sun): dequote(""://xp0/C\$"") -> ://xp0/C\$ Sep 16 01:03:13 tempgw automount[17954]: add_offset_entry: parse(sun): added multi-mount offset /C$ -> -fstype=cifs,username=USER,password=PASSWORD ://xp0/C\$ Sep 16 01:03:13 tempgw automount[17954]: mount_multi_triggers: mount offset /smb/xp0/ADMIN$ Sep 16 01:03:13 tempgw automount[17954]: mount_autofs_offset: calling mount -t autofs -s -o fd=18,pgrp=17954,minproto=5,maxproto=5,offset automount /smb/xp0/ADMIN$ Sep 16 01:03:13 tempgw automount[17954]: mount_autofs_offset: mounted trigger /smb/xp0/ADMIN$ Sep 16 01:03:13 tempgw automount[17954]: mount_multi_triggers: mount offset /smb/xp0/C Sep 16 01:03:13 tempgw automount[17954]: mount_autofs_offset: calling mount -t autofs -s -o fd=18,pgrp=17954,minproto=5,maxproto=5,offset automount /smb/xp0/C Sep 16 01:03:13 tempgw automount[17954]: mount_autofs_offset: mounted trigger /smb/xp0/C Sep 16 01:03:13 tempgw automount[17954]: mount_multi_triggers: mount offset /smb/xp0/C$ Sep 16 01:03:13 tempgw automount[17954]: mount_autofs_offset: calling mount -t autofs -s -o fd=18,pgrp=17954,minproto=5,maxproto=5,offset automount /smb/xp0/C$ Sep 16 01:03:13 tempgw automount[17954]: mount_autofs_offset: mounted trigger /smb/xp0/C$ Sep 16 01:03:13 tempgw automount[17954]: send_ready: token = 344 Sep 16 01:03:13 tempgw automount[17954]: handle_packet: type = 5 Sep 16 01:03:13 tempgw automount[17954]: handle_packet_missing_direct: token 345, name /smb/xp0/C$, request pid 17592 Sep 16 01:03:13 tempgw automount[17954]: attempting to mount entry /smb/xp0/C$ Sep 16 01:03:13 tempgw automount[17954]: lookup_mount: lookup(program): /smb/xp0/C$ -> -fstype=cifs,username=USER,password=PASSWORD ://xp0/C\$ Sep 16 01:03:13 tempgw automount[17954]: parse_mount: parse(sun): expanded entry: -fstype=cifs,username=USER,password=PASSWORD ://xp0/C\$ Sep 16 01:03:13 tempgw automount[17954]: parse_mount: parse(sun): gathered options: fstype=cifs,username=USER,password=PASSWORD Sep 16 01:03:13 tempgw automount[17954]: parse_mount: parse(sun): core of entry: options=fstype=cifs,username=USER,password=PASSWORD, loc=://xp0/C\$ Sep 16 01:03:13 tempgw automount[17954]: sun_mount: parse(sun): mounting root /smb, mountpoint /smb/xp0/C$, what //xp0/C\$, fstype cifs, options username=USER,password=PASSWORD Sep 16 01:03:13 tempgw automount[17954]: mounted /smb/xp0 Sep 16 01:03:13 tempgw automount[17954]: do_mount: //xp0/C\$ /smb//smb/xp0/C$ type cifs options username=USER,password=PASSWORD using module generic Sep 16 01:03:13 tempgw automount[17954]: mount_mount: mount(generic): calling mkdir_path /smb/xp0/C$ Sep 16 01:03:13 tempgw automount[17954]: mount_mount: mount(generic): calling mount -t cifs -s -o username=USER,password=PASSWORD //xp0/C\$ /smb/xp0/C$ Sep 16 01:03:13 tempgw automount[17954]: mount(generic): mounted //xp0/C\$ type cifs on /smb/xp0/C$ Sep 16 01:03:13 tempgw automount[17954]: send_ready: token = 345 Sep 16 01:03:13 tempgw automount[17954]: mounted /smb/xp0/C$ Sep 16 01:03:13 tempgw automount[17954]: st_expire: state 1 path /misc Sep 16 01:03:13 tempgw automount[17954]: expire_proc: exp_proc = 3082075024 path /misc Sep 16 01:03:13 tempgw automount[17954]: expire_cleanup: got thid 3082075024 path /misc stat 0 Sep 16 01:03:13 tempgw automount[17954]: expire_cleanup: sigchld: exp 3082075024 finished, switching from 2 to 1 Sep 16 01:03:13 tempgw automount[17954]: st_ready: st_ready(): state = 2 path /misc After cd /smb/xp0/C$ pwd yields: /smb/xp0/C$ and mount yields: //xp0/C/$ on /smb/xp0/C$ type cifs (rw,mand) Thanks Ian Kent wrote: > On Sat, 2008-09-13 at 12:03 +1000, Matthew Jurgens wrote: > >> Ok, so I updated the script to the RPM version and added the >> authentication parts: >> > > Right, the reason the script changed was because of the "$" shares. > I thought it was working ok but maybe a subsequent change to the daemon > has broken it. > > I'll try to duplicate the problem here but a debug log would also be > useful. See http://people.redhat.com/jmoyer for details. [-- Attachment #1.2: Type: text/html, Size: 7892 bytes --] [-- Attachment #2: Type: text/plain, Size: 140 bytes --] _______________________________________________ autofs mailing list autofs@linux.kernel.org http://linux.kernel.org/mailman/listinfo/autofs ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Not correctly mount SMB shares ending in $ 2008-09-13 12:30 ` Matthew Jurgens @ 2008-09-16 3:22 ` Ian Kent 2008-09-16 12:30 ` Ian Kent 1 sibling, 0 replies; 13+ messages in thread From: Ian Kent @ 2008-09-16 3:22 UTC (permalink / raw) To: Matthew Jurgens; +Cc: autofs@linux.kernel.org Sorry for the delay. On Sat, 2008-09-13 at 22:30 +1000, Matthew Jurgens wrote: > Debug Log: > > Sep 16 01:03:11 tempgw automount[17954]: st_expire: state 1 path /misc > Sep 16 01:03:11 tempgw automount[17954]: expire_proc: exp_proc = > 3083123600 path /misc > Sep 16 01:03:11 tempgw automount[17954]: expire_cleanup: got thid > 3083123600 path /misc stat 0 > Sep 16 01:03:11 tempgw automount[17954]: expire_cleanup: sigchld: exp > 3083123600 finished, switching from 2 to 1 > Sep 16 01:03:11 tempgw automount[17954]: st_ready: st_ready(): state = > 2 path /misc > Sep 16 01:03:12 tempgw automount[17954]: st_expire: state 1 path /misc > Sep 16 01:03:12 tempgw automount[17954]: expire_proc: exp_proc = > 3083123600 path /misc > Sep 16 01:03:12 tempgw automount[17954]: expire_cleanup: got thid > 3083123600 path /misc stat 0 > Sep 16 01:03:12 tempgw automount[17954]: expire_cleanup: sigchld: exp > 3083123600 finished, switching from 2 to 1 > Sep 16 01:03:12 tempgw automount[17954]: st_ready: st_ready(): state = > 2 path /misc > Sep 16 01:03:12 tempgw automount[17954]: handle_packet: type = 3 > Sep 16 01:03:12 tempgw automount[17954]: > handle_packet_missing_indirect: token 344, name xp0, request pid 17592 > Sep 16 01:03:12 tempgw automount[17954]: attempting to mount > entry /smb/xp0 > Sep 16 01:03:12 tempgw automount[17954]: lookup_mount: > lookup(program): looking up xp0 > Sep 16 01:03:13 tempgw automount[17954]: lookup_mount: > lookup(program): xp0 -> -fstype=cifs,username=USER,password=PASSWORD > #011 /C "://xp0/C" #011 /ADMIN\$ "://xp0/ADMIN\$" #011 /C\$ > "://xp0/C\$" > Sep 16 01:03:13 tempgw automount[17954]: parse_mount: parse(sun): > expanded entry: -fstype=cifs,username=USER,password=PASSWORD #011 /C > "://xp0/C" #011 /ADMIN\$ "://xp0/ADMIN\$" #011 /C\$ "://xp0/C\$" > Sep 16 01:03:13 tempgw automount[17954]: parse_mount: parse(sun): > gathered options: fstype=cifs,username=USER,password=PASSWORD > Sep 16 01:03:13 tempgw automount[17954]: parse_mount: parse(sun): > dequote("/C") -> /C > Sep 16 01:03:13 tempgw automount[17954]: parse_mapent: parse(sun): > gathered options: fstype=cifs,username=USER,password=PASSWORD > Sep 16 01:03:13 tempgw automount[17954]: parse_mapent: parse(sun): > dequote(""://xp0/C"") -> ://xp0/C > Sep 16 01:03:13 tempgw automount[17954]: add_offset_entry: parse(sun): > added multi-mount offset /C -> > -fstype=cifs,username=USER,password=PASSWORD ://xp0/C > Sep 16 01:03:13 tempgw automount[17954]: parse_mount: parse(sun): > dequote("/ADMIN\$") -> /ADMIN$ > Sep 16 01:03:13 tempgw automount[17954]: parse_mapent: parse(sun): > gathered options: fstype=cifs,username=USER,password=PASSWORD > Sep 16 01:03:13 tempgw automount[17954]: parse_mapent: parse(sun): > dequote(""://xp0/ADMIN\$"") -> ://xp0/ADMIN\$ > Sep 16 01:03:13 tempgw automount[17954]: add_offset_entry: parse(sun): > added multi-mount offset /ADMIN$ -> > -fstype=cifs,username=USER,password=PASSWORD ://xp0/ADMIN\$ > Sep 16 01:03:13 tempgw automount[17954]: parse_mount: parse(sun): > dequote("/C\$") -> /C$ > Sep 16 01:03:13 tempgw automount[17954]: parse_mapent: parse(sun): > gathered options: fstype=cifs,username=USER,password=PASSWORD > Sep 16 01:03:13 tempgw automount[17954]: parse_mapent: parse(sun): > dequote(""://xp0/C\$"") -> ://xp0/C\$ > Sep 16 01:03:13 tempgw automount[17954]: add_offset_entry: parse(sun): > added multi-mount offset /C$ -> > -fstype=cifs,username=USER,password=PASSWORD ://xp0/C\$ > Sep 16 01:03:13 tempgw automount[17954]: mount_multi_triggers: mount > offset /smb/xp0/ADMIN$ > Sep 16 01:03:13 tempgw automount[17954]: mount_autofs_offset: calling > mount -t autofs -s -o fd=18,pgrp=17954,minproto=5,maxproto=5,offset > automount /smb/xp0/ADMIN$ > Sep 16 01:03:13 tempgw automount[17954]: mount_autofs_offset: mounted > trigger /smb/xp0/ADMIN$ > Sep 16 01:03:13 tempgw automount[17954]: mount_multi_triggers: mount > offset /smb/xp0/C > Sep 16 01:03:13 tempgw automount[17954]: mount_autofs_offset: calling > mount -t autofs -s -o fd=18,pgrp=17954,minproto=5,maxproto=5,offset > automount /smb/xp0/C > Sep 16 01:03:13 tempgw automount[17954]: mount_autofs_offset: mounted > trigger /smb/xp0/C > Sep 16 01:03:13 tempgw automount[17954]: mount_multi_triggers: mount > offset /smb/xp0/C$ > Sep 16 01:03:13 tempgw automount[17954]: mount_autofs_offset: calling > mount -t autofs -s -o fd=18,pgrp=17954,minproto=5,maxproto=5,offset > automount /smb/xp0/C$ > Sep 16 01:03:13 tempgw automount[17954]: mount_autofs_offset: mounted > trigger /smb/xp0/C$ > Sep 16 01:03:13 tempgw automount[17954]: send_ready: token = 344 > Sep 16 01:03:13 tempgw automount[17954]: handle_packet: type = 5 > Sep 16 01:03:13 tempgw automount[17954]: handle_packet_missing_direct: > token 345, name /smb/xp0/C$, request pid 17592 > Sep 16 01:03:13 tempgw automount[17954]: attempting to mount > entry /smb/xp0/C$ > Sep 16 01:03:13 tempgw automount[17954]: lookup_mount: > lookup(program): /smb/xp0/C$ -> > -fstype=cifs,username=USER,password=PASSWORD ://xp0/C\$ > Sep 16 01:03:13 tempgw automount[17954]: parse_mount: parse(sun): > expanded entry: -fstype=cifs,username=USER,password=PASSWORD ://xp0/C\ > $ > Sep 16 01:03:13 tempgw automount[17954]: parse_mount: parse(sun): > gathered options: fstype=cifs,username=USER,password=PASSWORD > Sep 16 01:03:13 tempgw automount[17954]: parse_mount: parse(sun): core > of entry: options=fstype=cifs,username=USER,password=PASSWORD, > loc=://xp0/C\$ > Sep 16 01:03:13 tempgw automount[17954]: sun_mount: parse(sun): > mounting root /smb, mountpoint /smb/xp0/C$, what //xp0/C\$, fstype > cifs, options username=USER,password=PASSWORD > Sep 16 01:03:13 tempgw automount[17954]: mounted /smb/xp0 > Sep 16 01:03:13 tempgw automount[17954]: do_mount: //xp0/C\ > $ /smb//smb/xp0/C$ type cifs options username=USER,password=PASSWORD > using module generic > Sep 16 01:03:13 tempgw automount[17954]: mount_mount: mount(generic): > calling mkdir_path /smb/xp0/C$ > Sep 16 01:03:13 tempgw automount[17954]: mount_mount: mount(generic): > calling mount -t cifs -s -o username=USER,password=PASSWORD //xp0/C\ > $ /smb/xp0/C$ So it appears autofs is doing the right thing. But it doesn't end up right, odd! > Sep 16 01:03:13 tempgw automount[17954]: mount(generic): > mounted //xp0/C\$ type cifs on /smb/xp0/C$ > Sep 16 01:03:13 tempgw automount[17954]: send_ready: token = 345 > Sep 16 01:03:13 tempgw automount[17954]: mounted /smb/xp0/C$ And again it tells us the right thing. > Sep 16 01:03:13 tempgw automount[17954]: st_expire: state 1 path /misc > Sep 16 01:03:13 tempgw automount[17954]: expire_proc: exp_proc = > 3082075024 path /misc > Sep 16 01:03:13 tempgw automount[17954]: expire_cleanup: got thid > 3082075024 path /misc stat 0 > Sep 16 01:03:13 tempgw automount[17954]: expire_cleanup: sigchld: exp > 3082075024 finished, switching from 2 to 1 > Sep 16 01:03:13 tempgw automount[17954]: st_ready: st_ready(): state = > 2 path /misc > > > > After cd /smb/xp0/C$ > pwd yields: /smb/xp0/C$ > and mount yields: //xp0/C/$ on /smb/xp0/C$ type cifs (rw,mand) > > Thanks > > Ian Kent wrote: > > On Sat, 2008-09-13 at 12:03 +1000, Matthew Jurgens wrote: > > > > > Ok, so I updated the script to the RPM version and added the > > > authentication parts: > > > > > > > Right, the reason the script changed was because of the "$" shares. > > I thought it was working ok but maybe a subsequent change to the daemon > > has broken it. > > > > I'll try to duplicate the problem here but a debug log would also be > > useful. See http://people.redhat.com/jmoyer for details. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Not correctly mount SMB shares ending in $ 2008-09-13 12:30 ` Matthew Jurgens 2008-09-16 3:22 ` Ian Kent @ 2008-09-16 12:30 ` Ian Kent 1 sibling, 0 replies; 13+ messages in thread From: Ian Kent @ 2008-09-16 12:30 UTC (permalink / raw) To: Matthew Jurgens; +Cc: autofs@linux.kernel.org On Sat, 2008-09-13 at 22:30 +1000, Matthew Jurgens wrote: > Debug Log: > snip ... > Sep 16 01:03:13 tempgw automount[17954]: mounted /smb/xp0 > Sep 16 01:03:13 tempgw automount[17954]: do_mount: //xp0/C\ > $ /smb//smb/xp0/C$ type cifs options username=USER,password=PASSWORD > using module generic > Sep 16 01:03:13 tempgw automount[17954]: mount_mount: mount(generic): > calling mkdir_path /smb/xp0/C$ > Sep 16 01:03:13 tempgw automount[17954]: mount_mount: mount(generic): > calling mount -t cifs -s -o username=USER,password=PASSWORD //xp0/C\ > $ /smb/xp0/C$ This is the mount command we actually use. We get rid of the quotes during the parsing of the entry but still the backslash quote could be causing a problem. Do you agree or should I be looking elsewhere? > Sep 16 01:03:13 tempgw automount[17954]: mount(generic): > mounted //xp0/C\$ type cifs on /smb/xp0/C$ > Sep 16 01:03:13 tempgw automount[17954]: send_ready: token = 345 > Sep 16 01:03:13 tempgw automount[17954]: mounted /smb/xp0/C$ Ian ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Not correctly mount SMB shares ending in $ 2008-09-13 2:03 ` Matthew Jurgens 2008-09-13 3:09 ` Ian Kent @ 2008-09-16 4:16 ` Ian Kent 2008-09-16 10:22 ` Jeff Layton [not found] ` <1221539403.15861.108.camel@homebase.localnet> 2 siblings, 1 reply; 13+ messages in thread From: Ian Kent @ 2008-09-16 4:16 UTC (permalink / raw) To: Matthew Jurgens; +Cc: autofs@linux.kernel.org, Jeffrey Layton On Sat, 2008-09-13 at 12:03 +1000, Matthew Jurgens wrote: > Ok, so I updated the script to the RPM version and added the > authentication parts: > > #!/bin/bash > > # This file must be executable to work! chmod 755! > key="$1" # key comes is as something like a hostname eg matthew > opts="-fstype=cifs,username=$SMB_USER,password=$SMB_PASSWORD" > > smbauthfile=/tmp/smbauth.tmp > cat << EOT > $smbauthfile > username=$SMB_USER > password=$SMB_PASSWORD > EOT > > 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 -A $smbauthfile -gL $key 2>/dev/null| awk -v key="$key" -v > opts="$opts" -F'|' -- ' > BEGIN { ORS=""; first=1 } > /Disk/ { > if (first) > print opts; first=0 > dir = $2 > loc = $2 > # Enclose mount dir and location in quotes > # Double quote "$" in location as it is special > gsub(/\$$/, "\\$", loc); > print " \\\n\t \"/" dir "\"", "\"://" key "/" loc > "\"" > } > END { if (!first) print "\n"; else exit 1 } > ' > > > > Now its output is slightly different but the result is still the same > -fstype=cifs,username=USER,password=PASSWORD \ > "/C" "://xp0/C" \ > "/ADMIN$" "://xp0/ADMIN\$" \ > "/C$" "://xp0/C\$" > > vs the older output > -fstype=cifs,username=USER,password=PASSWORD \ > /C "://xp0/C" \ > /ADMIN\$ "://xp0/ADMIN\$" \ > /C\$ "://xp0/C\$" > mount: > //xp0/C/$ on /smb/xp0/C$ type cifs (rw,mand) As I said before, the mount command looks OK, but I wonder if any recent CIFS kernel changes are getting confused by the "\" in the location (aka //xp0/C\$). That would be a bit of a bummer as autofs needs it but getting rid of it before the actual mount isn't straight forward. Ian ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Not correctly mount SMB shares ending in $ 2008-09-16 4:16 ` Ian Kent @ 2008-09-16 10:22 ` Jeff Layton 2008-09-16 12:21 ` Ian Kent 0 siblings, 1 reply; 13+ messages in thread From: Jeff Layton @ 2008-09-16 10:22 UTC (permalink / raw) To: Ian Kent; +Cc: autofs@linux.kernel.org On Tue, 16 Sep 2008 12:16:42 +0800 Ian Kent <raven@themaw.net> wrote: > On Sat, 2008-09-13 at 12:03 +1000, Matthew Jurgens wrote: > > Ok, so I updated the script to the RPM version and added the > > authentication parts: > > > > #!/bin/bash > > > > # This file must be executable to work! chmod 755! > > key="$1" # key comes is as something like a hostname eg matthew > > opts="-fstype=cifs,username=$SMB_USER,password=$SMB_PASSWORD" > > > > smbauthfile=/tmp/smbauth.tmp > > cat << EOT > $smbauthfile > > username=$SMB_USER > > password=$SMB_PASSWORD > > EOT > > > > 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 -A $smbauthfile -gL $key 2>/dev/null| awk -v key="$key" -v > > opts="$opts" -F'|' -- ' > > BEGIN { ORS=""; first=1 } > > /Disk/ { > > if (first) > > print opts; first=0 > > dir = $2 > > loc = $2 > > # Enclose mount dir and location in quotes > > # Double quote "$" in location as it is special > > gsub(/\$$/, "\\$", loc); > > print " \\\n\t \"/" dir "\"", "\"://" key "/" loc > > "\"" > > } > > END { if (!first) print "\n"; else exit 1 } > > ' > > > > > > > > Now its output is slightly different but the result is still the same > > -fstype=cifs,username=USER,password=PASSWORD \ > > "/C" "://xp0/C" \ > > "/ADMIN$" "://xp0/ADMIN\$" \ > > "/C$" "://xp0/C\$" > > > > vs the older output > > -fstype=cifs,username=USER,password=PASSWORD \ > > /C "://xp0/C" \ > > /ADMIN\$ "://xp0/ADMIN\$" \ > > /C\$ "://xp0/C\$" > > mount: > > //xp0/C/$ on /smb/xp0/C$ type cifs (rw,mand) > > As I said before, the mount command looks OK, but I wonder if any recent > CIFS kernel changes are getting confused by the "\" in the location > (aka //xp0/C\$). That would be a bit of a bummer as autofs needs it but > getting rid of it before the actual mount isn't straight forward. > Yes. There are some recent changes to the mount.cifs command and CIFS VFS in kernel to try to handle delimiters a little more intelligently (they were really broken before in some cases). This mount command does not look right to me though. You have this: "://xp0/C\$" ...and the mount helper is interpreting that last \ as a delimiter. Since you have that in quotes already, you shouldn't need to escape the trailing $. So I think this would be more likely to work: "://xp0/C$" Cheers, -- Jeff Layton <jlayton@redhat.com> ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Not correctly mount SMB shares ending in $ 2008-09-16 10:22 ` Jeff Layton @ 2008-09-16 12:21 ` Ian Kent 0 siblings, 0 replies; 13+ messages in thread From: Ian Kent @ 2008-09-16 12:21 UTC (permalink / raw) To: Jeff Layton; +Cc: autofs@linux.kernel.org On Tue, 2008-09-16 at 06:22 -0400, Jeff Layton wrote: > On Tue, 16 Sep 2008 12:16:42 +0800 > Ian Kent <raven@themaw.net> wrote: > > > On Sat, 2008-09-13 at 12:03 +1000, Matthew Jurgens wrote: > > > Ok, so I updated the script to the RPM version and added the > > > authentication parts: > > > > > > #!/bin/bash > > > > > > # This file must be executable to work! chmod 755! > > > key="$1" # key comes is as something like a hostname eg matthew > > > opts="-fstype=cifs,username=$SMB_USER,password=$SMB_PASSWORD" > > > > > > smbauthfile=/tmp/smbauth.tmp > > > cat << EOT > $smbauthfile > > > username=$SMB_USER > > > password=$SMB_PASSWORD > > > EOT > > > > > > 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 -A $smbauthfile -gL $key 2>/dev/null| awk -v key="$key" -v > > > opts="$opts" -F'|' -- ' > > > BEGIN { ORS=""; first=1 } > > > /Disk/ { > > > if (first) > > > print opts; first=0 > > > dir = $2 > > > loc = $2 > > > # Enclose mount dir and location in quotes > > > # Double quote "$" in location as it is special > > > gsub(/\$$/, "\\$", loc); > > > print " \\\n\t \"/" dir "\"", "\"://" key "/" loc > > > "\"" > > > } > > > END { if (!first) print "\n"; else exit 1 } > > > ' > > > > > > > > > > > > Now its output is slightly different but the result is still the same > > > -fstype=cifs,username=USER,password=PASSWORD \ > > > "/C" "://xp0/C" \ > > > "/ADMIN$" "://xp0/ADMIN\$" \ > > > "/C$" "://xp0/C\$" > > > > > > vs the older output > > > -fstype=cifs,username=USER,password=PASSWORD \ > > > /C "://xp0/C" \ > > > /ADMIN\$ "://xp0/ADMIN\$" \ > > > /C\$ "://xp0/C\$" > > > mount: > > > //xp0/C/$ on /smb/xp0/C$ type cifs (rw,mand) > > > > As I said before, the mount command looks OK, but I wonder if any recent > > CIFS kernel changes are getting confused by the "\" in the location > > (aka //xp0/C\$). That would be a bit of a bummer as autofs needs it but > > getting rid of it before the actual mount isn't straight forward. > > > > Yes. There are some recent changes to the mount.cifs command and CIFS > VFS in kernel to try to handle delimiters a little more intelligently > (they were really broken before in some cases). This mount command does > not look right to me though. You have this: > > "://xp0/C\$" > > ...and the mount helper is interpreting that last \ as a delimiter. > Since you have that in quotes already, you shouldn't need to escape the > trailing $. So I think this would be more likely to work: As with all things it's not quite that simple. The "$" needs to be doubly escaped because it's also indicates a possible macro definition in a map entry. > > "://xp0/C$" > > Cheers, ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <1221539403.15861.108.camel@homebase.localnet>]
* Re: Not correctly mount SMB shares ending in $ [not found] ` <1221539403.15861.108.camel@homebase.localnet> @ 2008-09-16 4:48 ` Ian Kent 0 siblings, 0 replies; 13+ messages in thread From: Ian Kent @ 2008-09-16 4:48 UTC (permalink / raw) To: psmith; +Cc: autofs@linux.kernel.org On Tue, 2008-09-16 at 00:30 -0400, Paul Smith wrote: > On Sat, 2008-09-13 at 12:03 +1000, Matthew Jurgens wrote: > > Ok, so I updated the script to the RPM version and added the > > authentication parts: > > > > #!/bin/bash > > I guess maybe it's my pet peeve (like people who write "loose" when they > mean "lose", and vice versa), but I'd really, really love it if we could > avoid using bash in shell scripts, especially where (as in this case) > it's completely unnecessary. > > Can't we write our scripts in /bin/sh? > > I have some embedded systems that use autofs and I surely don't want to > have to build and install bash in my nice, small, busybox-based RAMDISK > just to run a few support scripts. And it would be nice if I didn't > have to gin up custom patches for them either. It's very, very simple > in virtually all cases to write your script in POSIX-standard sh rather > than bash... it just requires a bit of diligence. I admit I don't usually think of embedded systems. I'll have to get onto that but I don't think version 5 is appropriate for an embedded system (maybe too big) and version 4 hasn't seen much love for a good while now. Anyway, I expect you have more than enough trouble setting up working tool chains than to have to worry about this sort of thing, ;) Ian ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2008-09-16 12:30 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-09 4:01 Not correctly mount SMB shares ending in $ Matthew Jurgens
2008-09-10 3:49 ` Ian Kent
2008-09-11 8:34 ` Matthew Jurgens
2008-09-11 14:16 ` Ian Kent
2008-09-13 2:03 ` Matthew Jurgens
2008-09-13 3:09 ` Ian Kent
2008-09-13 12:30 ` Matthew Jurgens
2008-09-16 3:22 ` Ian Kent
2008-09-16 12:30 ` Ian Kent
2008-09-16 4:16 ` Ian Kent
2008-09-16 10:22 ` Jeff Layton
2008-09-16 12:21 ` Ian Kent
[not found] ` <1221539403.15861.108.camel@homebase.localnet>
2008-09-16 4:48 ` Ian Kent
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.