LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   automount setup not taking hold... (https://www.linuxquestions.org/questions/centos-111/automount-setup-not-taking-hold-4175648237/)

BW-userx 02-13-2019 10:59 AM

automount setup not taking hold...
 
(much of nothing works in initial install?) don't answer that.. :D

I did this to try and get auto mount to work for usb ports, as it is not even trying to mount anything i plug into the usb ports.

using system settings (KDE) I went into removable devices and turned on automount, that did not work so I did this


How to configure the autofs daemon on CentOS 7/Rhel 7


Code:

[userx@centoast ~]$  sudo yum install autofs
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.dc2.hackingand.coffee
 * epel: mirror.compevo.com
 * extras: repos-tx.psychz.net
 * nux-dextop: mirror.li.nux.ro
 * updates: repos-tx.psychz.net
Package 1:autofs-5.0.7-99.el7.x86_64 already installed and latest version
Nothing to do
[userx@centoast ~]$ sudo systemctl enable --now autofs

rebooted still nothing... the only off board thing working is my SD Card reader that has a card always plugged into it.

jsbjsb001 02-14-2019 02:06 AM

1 Attachment(s)
Hi BW,

While I'm not entirely sure if you mean "automount via the command-line" or "automount via KDE", since you mention KDE system settings; if you right click on the little USB icon for the "Device Notifier" applet in the main KDE panel (where the menu for your apps are, etc), then click on "Device Notifier Settings", you should see a dialog box come up (make sure you haven't locked widgets). Then in that dialog box, click on "Removable Devices", and if I'm understanding your question correctly, you should see the option you're after - just enable it. You might also need to have a look at the options below the main option there, to make sure it automount's your USB's the way you want, like for example "when attached", or "when it's been manually mounted before", etc.

But here's the essential bit that you may have missed; you MUST select your USB under "Device Overrides" below the same options I was talking about before! Or as I found out myself, it will NOT work. You'll see two options being "Automount at Login" and "Automount on Attach", so it depends on exactly what you want as to which one you choose. You only need to choose one of those options.

I've attached a screenshot of the settings I'm talking about for you below.

Also, the "autofs" package is installed by default in CentOS 7. But you will need to enable the "autofs" service though, as it is not enabled by default. I did not need to make any changes to the "autofs" service, or "autofs" itself though. But if you were talking about NFS shares or other networking shares, then you most likely would need to do some more config to get that working.

Note: I use KDE4 myself, so my advice above is for KDE4. I DID test this and it does work. I'm not sure what it is in KDE5 though.


All times are GMT -5. The time now is 01:25 PM.