View previous topic :: View next topic |
Author |
Message |
naviathan Apprentice
Joined: 12 Dec 2004 Posts: 231
|
Posted: Fri Mar 11, 2005 12:19 pm Post subject: Setting up a windows share in fstab... |
|
|
Here's my line and it keeps telling me the line is bad. I had to remove certain information of course.
Code: |
//host_ip/HOST\ Multimedia\ Shares/ /mnt/shares smbfs credentials=/root/.shareauth,uid=root,gid=users,dmask=0770,fmask=0660,_netmount 0 0
|
Evertime I try to mount it mount says the line is bad.
Code: |
lintop64 ~ # mount /mnt/shares
[mntent]: line 19 in /etc/fstab is bad
mount: can't find /mnt/shares in /etc/fstab or /etc/mtab
|
I use a similar line in a script for mounting the share and everything works fine. I have to use the host ip because we're having network problems with name resolution right now.
The script line reads:
Code: |
mount -t smbfs -o credentials=/root/.shareauth,workgroup=domain //host_ip/HOST\ Multimedia\ Shares /mnt/shares
|
_________________ I respect faith, but doubt is what gives you an education.
-- Wilson Mizner |
|
Back to top |
|
|
thebigslide l33t
Joined: 23 Dec 2004 Posts: 792 Location: under a car or on top of a keyboard
|
Posted: Fri Mar 11, 2005 12:25 pm Post subject: |
|
|
AFAIK, you can't put filepaths with spaces in fstab. Maybe with quotes?
Edit: nope, not even with quotes.
Make another dir without spaces in it's names and make your fancy-pants path a link to that dir.
Edit: nope, that won't help because the fancy-pantsness is on the server. You'll have to use underscores, I guess. |
|
Back to top |
|
|
naviathan Apprentice
Joined: 12 Dec 2004 Posts: 231
|
Posted: Fri Mar 11, 2005 12:47 pm Post subject: |
|
|
Unfortunately it's a windows server so I have no choice on the share name, I don't have control of it.. Underscores don't work. No Such Share Found. Is there anyway to put this path name into fstab? I tried quote and that didn't fly.
I fixed the path problem by making a link called /sharelink to the share path, but now it says I need to add a -o to the options inorder to mount with smbfs. You add the -o to fstab and it calls the line bad again. Example:
Code: |
ln -s "//host_ip/HOST\ Multimedia\ Shares" /sharelink
|
Now add to fstab:
Code: |
/sharelink /mnt/shares smbfs credentials=/root/.shareauth,workgroup=imefdm 0 0
|
This gives me the mount.smbfs help menu. So I add a -o:
Code: |
/sharelink /mnt/shares smbfs -o credentials=/root/.shareauth,workgroup=imefdm 0 0
|
Now we're back to a bad line. This is getting redundant. You can't have spaces in fstab, but you can't mount smbfs with a -o with a space before the options. Feels like a dependency loop. My head hurts now.... _________________ I respect faith, but doubt is what gives you an education.
-- Wilson Mizner
Last edited by naviathan on Fri Mar 11, 2005 1:11 pm; edited 1 time in total |
|
Back to top |
|
|
thebigslide l33t
Joined: 23 Dec 2004 Posts: 792 Location: under a car or on top of a keyboard
|
Posted: Fri Mar 11, 2005 12:53 pm Post subject: |
|
|
if you can't change the share name on the server, there is no way of putting it in fstab, then, AFAIK. You will have to hack the bootscripts and/or make an alias in your bashrc like:
alias mount /mnt/winshared="mount //ip/share\ name /mnt/winshared -t smbfs -o options" |
|
Back to top |
|
|
naviathan Apprentice
Joined: 12 Dec 2004 Posts: 231
|
Posted: Fri Mar 11, 2005 3:03 pm Post subject: |
|
|
Now that's an idea. I didn't think about making an alias for it. Thanks for the info! _________________ I respect faith, but doubt is what gives you an education.
-- Wilson Mizner |
|
Back to top |
|
|
WaVeX Tux's lil' helper
Joined: 15 Mar 2004 Posts: 102 Location: USA, Michigan or Ohio
|
Posted: Tue Apr 05, 2005 9:50 pm Post subject: |
|
|
Code: | //host_ip/HOST\040Multimedia\040Shares/ /mnt/shares smbfs |
You need to give the escape command then give the key code for space. which is 040. |
|
Back to top |
|
|
thebigslide l33t
Joined: 23 Dec 2004 Posts: 792 Location: under a car or on top of a keyboard
|
Posted: Wed Apr 06, 2005 5:23 pm Post subject: |
|
|
Thanks for the tip! |
|
Back to top |
|
|
|