Does Linux remember previous network share connections?

Deadjasper

2[H]4U
Joined
Oct 28, 2001
Messages
2,584
I'm using the Connect to Server command in Nemo to connect to mainly Windows shares and it works well but even tho I check the remember password box it doesn't seem to remember anything. Is there a way to establish connections and have them remembered? Like Remmina does so from then on it's just one click to connect. In networking, Windows Network shows up but it's always empty. Don't really want to beat that dead horse again. Connecting to my FreeNAS box has always worked properly but not Windows, it never has.

Thanks
 
Or you can add them to your file manager if it supports it, and it'll remember.
 
Wish I could help more, but it's been years since I needed/bothered with SMB. Back then I think I had to modify smb.conf settings because the defaults were not compatible with newer flavors of Windows. Might googlefoo about smb.conf sttings and compatibility with your Win version.
 
Under KDE Plasma with Dolphin File Manager, from memory I installed 'kdenetwork-filesharing' and the sharing tab under properties as well as 'Remote' under the Places panel became visible.

All I do is browse to the share via: Network > Shared Folders, enter the credentials and I'm done. Dolphin remembers the credentials as well as the share, so there's no need to enter credentials every time. There's even an 'Add Network Folder' button, similar to 'Map Network Drive' under Windows.
 

Attachments

  • Network sharing Dolphin.png
    Network sharing Dolphin.png
    176.4 KB · Views: 0
Last edited:
This is the answer

https://wiki.ubuntu.com/MountWindowsSharesPermanently

Ubuntu Wiki's primer on it, but should work on any Linux distro

A possible issue with using fstab to be aware of: Any username/password generally will be stored in cleartext somewhere, either in fstab itself or in a credentials file. This may or may not be OK for a given use case and your comfort level. There is an option to use the kernel's keychain via cifscreds, Red Hat has a page that describes using it and various other options. KDE and Gnome, and possibly other desktop environments, will store this info encrypted in their keychain apps.

The other issue with using fstab is that the system can get really unhappy should it not be able to find listed shares for some reason (e.g., a laptop away from the local LAN, a down NAS). Using the desktop environment rarely has such issues. If you don't want to use the DE to manage shares for whatever reason, then autofs is strongly recommended.
 
A possible issue with using fstab to be aware of: Any username/password generally will be stored in cleartext somewhere, either in fstab itself or in a credentials file. This may or may not be OK for a given use case and your comfort level. There is an option to use the kernel's keychain via cifscreds, Red Hat has a page that describes using it and various other options. KDE and Gnome, and possibly other desktop environments, will store this info encrypted in their keychain apps.

The other issue with using fstab is that the system can get really unhappy should it not be able to find listed shares for some reason (e.g., a laptop away from the local LAN, a down NAS). Using the desktop environment rarely has such issues. If you don't want to use the DE to manage shares for whatever reason, then autofs is strongly recommended.

Yea, I vaguely remember using fstab some time back and ran into serious issues when the share was no longer available. For my purposes, the connection to the share has to be dynamic, manual connect is OK if the details are stored but Linux pitching a fit when a share disappears is totally unacceptable.
 
A possible issue with using fstab to be aware of: Any username/password generally will be stored in cleartext somewhere, either in fstab itself or in a credentials file.
You can easily put the username and password into a file, store it in /root for example with chmod 600 so that is only readable by the root user, and reference it in /etc/fstab with credentials={filename}
 
You can easily put the username and password into a file, store it in /root for example with chmod 600 so that is only readable by the root user, and reference it in /etc/fstab with credentials={filename}

Yes, that's the credentials file option I'd mentioned, and is also outlined in the link I'd made. And as I'd alluded to, doing so may or may not be an acceptable idea depending on the situation.
 
Back
Top