[HanoiLUG] mounting w2k3 share at boot
Steve
steve at hivemind.net
Fri Sep 22 15:51:06 ICT 2006
On 22/09/06, David Tremblay <david at roy-tremblay.net> wrote:
> Hi!
>
> a technical one for friday afternoon
>
> I can easily mount a w2k3 share by doing the following
>
> mount -t cifs -o username=david //192.168.0.1/'LERAP DOCS'
> /home/david/lerapdocs
>
> then it ask me a password and it works read write access and so on
>
> but when I put the following line in fstab then it complain that the
> line is erroneous
>
> //192.168.0.1/'LERAP DOCS' /home/david/lerapdocs cifs
> username=david,password=xxxxxxxx,dmask=777,fmask=777 0 0
>
> what's wrong with it ?
Thing is, that single quotes you add is to protect the
space, and you need this when typing the command in bash. Bash strips
the quotes out before actually passing the arguments to the mount
command. I'm pretty sure the same thing does not happen in
/etc/fstab, but a space is still a problem, because it is also used as
delimiter in fstab. You need to escape it in some other manner
The man page mentions something about escaping a space with /040
(octal for 32, which is the ascii number for space), but it is
mentioned in the context of the mount point.
If that first idea doesn't work, try using:
//192.168.0.1/LERAP\040DOCS /home/david/lerapdocs cifs
username=david,password=xxxxxxxx,dmask=777,fmask=777 0 0
Steve
More information about the HanoiLUG
mailing list