automount SMB share using pam_mount

asked 2018-11-14 15:11:47 -0500

ginnun gravatar image

updated 2018-11-15 15:03:37 -0500

EDIT: I finally found the following solution.

This explain how to automount a SMB share (From a FreeNAS 11 server) on Fedora 29 on user login.

1: Install pam mount

sudo dnf install pam_mount

2: Edit pam mount configuration file:

Open the following file:

sudo nano /etc/security/pam_mount.conf.xml

Then add share information before </pam_mount>:


3: Enable pam mount

Open the following file:

sudo nano /etc/pam.d/password-auth

Add at the beginning:

auth        required                           

Add at the end:

session     optional                           
edit retag flag offensive close merge delete


At the top of password-auth it says # This file is auto-generated. # User changes will be destroyed the next time authconfig is run. It seems like a bad idea to edit it. What's the right solution?

jreinhart gravatar imagejreinhart ( 2018-12-27 20:05:34 -0500 )edit