Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Setting up a windows share in fstab...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
naviathan
Apprentice
Apprentice


Joined: 12 Dec 2004
Posts: 231

PostPosted: Fri Mar 11, 2005 12:19 pm    Post subject: Setting up a windows share in fstab... Reply with quote

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
View user's profile Send private message
thebigslide
l33t
l33t


Joined: 23 Dec 2004
Posts: 792
Location: under a car or on top of a keyboard

PostPosted: Fri Mar 11, 2005 12:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
naviathan
Apprentice
Apprentice


Joined: 12 Dec 2004
Posts: 231

PostPosted: Fri Mar 11, 2005 12:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
thebigslide
l33t
l33t


Joined: 23 Dec 2004
Posts: 792
Location: under a car or on top of a keyboard

PostPosted: Fri Mar 11, 2005 12:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
naviathan
Apprentice
Apprentice


Joined: 12 Dec 2004
Posts: 231

PostPosted: Fri Mar 11, 2005 3:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
WaVeX
Tux's lil' helper
Tux's lil' helper


Joined: 15 Mar 2004
Posts: 102
Location: USA, Michigan or Ohio

PostPosted: Tue Apr 05, 2005 9:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
thebigslide
l33t
l33t


Joined: 23 Dec 2004
Posts: 792
Location: under a car or on top of a keyboard

PostPosted: Wed Apr 06, 2005 5:23 pm    Post subject: Reply with quote

Thanks for the tip!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum