LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   fstab and samba? (https://www.linuxquestions.org/questions/linux-networking-3/fstab-and-samba-270624/)

shanenin 12-26-2004 08:56 PM

fstab and samba?
 
I am not having any luck mounting my samba share by using my fstab file
below is what I have in my fstab
Code:

//marsala/My\ Documents  /home/shane/samba  smbfs  username=root,password=<password>,users,noauto    0 0
when I type mount test , I get this output
Code:

shane@mainbox shane $ mount samba
[mntent]: line 18 in /etc/fstab is bad
mount: can't find /home/shane/samba in /etc/fstab or /etc/mtab

/home/shane/samba is in my fstab, according to the error lmessage, it is not in there.

I am able to mount my share manually using this command
Code:

mount -t smbfs //marsala/My\ Documents /home/shane/samba

twsnnva 12-27-2004 04:36 PM

You can't mount samba shares via fstab when the exported name contains spaces. The best way to fix this would be to share the folder with an underscore in place of the space. I guess, alternatively, you could create a startup script and mount the share with it. I'm not sure about gentoo but for debian I would create a script(chmod +x) called "S99mountshare", containing:
Code:

#!/bin/sh
/sbin/mount -t smbfs //marsala/My\ Documents /home/shane/samba -o username="user",password="pass"

and place it in the /etc/rcS.d/ directory.

Ateo 12-27-2004 04:52 PM

I've never been able to mount an fstab defined mountpoint that contains a space. Best bet, use an underscore.


All times are GMT -5. The time now is 11:39 AM.