I am trying to mount shares provided by Windows machines on my Linux machine (RedHat 7.0) so I can do backups to a tape drive on the Linux machine. I can successfully mount several of the shares by including them in fstab, like so: //windowsserver/sharename /mnt/sharename smbfs guest 0 0 But if I try to do this with a windows share that has a blank space in the name //windowsserver/share name /mnt/sharewithblank smbfs guest 0 0 it fails, telling me there's no mount point called "name". I tried putting quotes around "share name" and putting a "\" before the space - still no success. I can do this mount -t smbfs //windowsserver/"share name" /mnt/sharewithblank -o guest and it mounts fine. Any way to cleanly automate this, or do I need to put the mount command in a startup file? If so, where? Thanks for your help. Steve McClary
Try escaping the quotes as in: \"share name\" Kevin Steve McClary wrote:> > I am trying to mount shares provided by Windows machines on my Linux > machine (RedHat 7.0) so I can do backups to a tape drive on the Linux > machine. I can successfully mount several of the shares by including them > in fstab, like so: > > //windowsserver/sharename /mnt/sharename smbfs guest 0 0 > > But if I try to do this with a windows share that has a blank space in the name > > //windowsserver/share name /mnt/sharewithblank smbfs guest 0 0 > > it fails, telling me there's no mount point called "name". > > I tried putting quotes around "share name" and putting a "\" before the > space - still no success. > > I can do this > > mount -t smbfs //windowsserver/"share name" /mnt/sharewithblank -o guest > > and it mounts fine. > > Any way to cleanly automate this, or do I need to put the mount command in > a startup file? If so, where? > > Thanks for your help. > > Steve McClary
On Fri, 26 Jan 2001, Steve McClary wrote:> But if I try to do this with a windows share that has a blank space in > the name > > //windowsserver/share name /mnt/sharewithblank smbfs guest 0 0 > > it fails, telling me there's no mount point called "name".It's a mount bug (or is it intentional?) where it doesn't allow escaping space (or other characters for that matter) in fstab. smbmount understands space just fine, although I'm not sure how mount passes parameters so there could be a problem there too. If someone feels like fixing it get the util-linux package, verify that the mount in there still has the problem, talk to the maintainer(s), fix the bug (not necessarily in that order :) ftp://ftp.*.kernel.org/pub/linux/utils/util-linux/ (* = se, us, fi, ...)> mount -t smbfs //windowsserver/"share name" /mnt/sharewithblank -o guest > > and it mounts fine. > > Any way to cleanly automate this, or do I need to put the mount command in > a startup file? If so, where?You should be able to put the mount command in /etc/rc.d/rc.local, also someone posted a perl script that allows urlencoding entries in fstab, thus avoiding spaces (look about a week back in the archives). /Urban
Thanks for the suggestion, putting the smbmount in rc.local seems to be working fine. The mounted drive shows up on the Linux machine with an underscore in the name instead of a blank, probably to tell me that that is a better way to do this anyway <g> Steve McClary At 08:57 PM 1/26/2001 +0100, Urban Widmark wrote:> > mount -t smbfs //windowsserver/"share name" /mnt/sharewithblank -o guest > > > > and it mounts fine. > > > > Any way to cleanly automate this, or do I need to put the mount command in > > a startup file? If so, where? > >You should be able to put the mount command in /etc/rc.d/rc.local, also >someone posted a perl script that allows urlencoding entries in fstab, >thus avoiding spaces (look about a week back in the archives). > >/Urban