Skip navigation.
Home
Now Shipping Version 8.0

Samba Persistency

Please forgive this silly question but every time I go into the samba tool and mount a share, it seems to disappear when I reboot. How do I get a share to 'stick' in Mepis? I'm not used to working in KDE and such. Thanks

Chris

Clarification Please

clivesay, can you please clarify your situation? By the "samba tool" are you meaning Smb4K? Also, what "share" are you meaning? A share that exists on a windows network or one that exists on your computer?

The Smb4K is intended to be a "personal browser" of shares. If you have proper permission it allows you to wander around your network, mount, and use different shares. It is not intended to permanently mount things. But you can set "bookmarks" to make the mounting a little easier.

What types of shares are you wanting to "stick"? Are you wanting a situation like Windows where you "Map Drive Letters"? In order to have things "permanently mounted" you have to put the information into /etc/fstab, but usernames and passwords might be required so this is a potential security risk.

Jon

Sorry

I guess I was too vague. I have a music PC running with samba. I want to be able to boot Mepis and have the share readily available for me. I can put in the info and mount with no problem. I added it to my bookmarks and rebooted but then it said it couldn't nount it so I open up the dialog and re-enter the info again and it comes right up and mounts without issue. I'm guessing I'm missing a step. I'm still really learning samba.

thanks for your help

Chris

use smb4k

smb4k will automatically mount shares for you on starting, if requested.
then set smb4k to start with your desktop startup

Still Problems

I can save my mountpoint in the bookmarks. When I reboot and then try and open smb4k it attempts to mount the share and gives a 'an error occurred while trying to get the list of workgroup members' or a 'connection to server failed' when trying the bookmark. If I enter the info manually and connect I can connect without trouble.

I can't figure this one out.

Chris

"mapping" a share

I do this at work with my home dir and so forth; I'm not aware of an easy GUI way to do it, but you can write a little script like such:

<br />
#!/bin/bash</p>
<p>smbmount //server/share /path/to/mountpoint<br />
exit<br />

And put it in a startup directory of some sort, such as ~/.kde/Autostart. This way, the share is "mapped" to the folder every time you start KDE.

Alternately, you can just make a shortcut on your desktop to smb://server/sharename/subfolder/

Hope that helps.

Thanks for all the help so

Thanks for all the help so far. I've spent alot of time RTFM. I can mount the share from a shell. The only thing I can't figure out is how to mount without a password. I've tried different combinations with no luck. I still am prompted to enter a password.

I tried adding the mount as a device on the desktop but it won't let me mount it from other than root. I added the commands to fstab.

I think I'm just missing a few pieces. I hope someone can help me fill in the gaps.

Thanks

Chris

Nope

Chris, I don't think you're missing anything. I don't have the info in front of me, but I'll check another system tomorrow. But I do have a system using smb mounts within /etc/fstab. The problem, and security issue, is that you have to give the user name and password within the /etc/fstab entry Sad

Generally, you need to set up a user on the windows side that you consider "safe" and that you won't be changing the password very often (ever?).

Jon

The network I'll use it on

The network I'll use it on does have passwords so I should be OK with /etc/fstab. There is something you can do to keep the password out of fstab called 'credentials'.

Here is a link I found that was really helpful.

http://www.justlinux.com/nhf/Filesystems/Mounting_smbfs_Shares_Permanently.html

Further Info

Chris, here is the information from one of the servers I set up.

This is how you enter a Windows share in /etc/fstab
Note, everything below should be on one line. I have marked where a space or tab should be with "(space)"

//some/windows/share(space)/mepis/mount/point(space)smbfs(space)username=Administrator,password=secret(space)0(space)0

Also, if your windows share has spaces in the name there's a way to do that too (this took some digging to find in the documentation).

Replace each space in the windows share name with "\040" without the quotation marks. That is the octal value for a space of course Smiling
Example:

//windows/share\040name\040with\040spaces

Clivesay, I just looked at your link. Very good info. I completely forgot about storing the username and password within a root-only-readable file! Thanks for the reminder. I'm gonna put it on the system that I have here.

Jon

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.