Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17781

Using Pam_Mount to mount shares

$
0
0

Hello,

I am attempting to configure pam_mount on RHEL 7 to mount some CIFS shares on my network, but to date am not having any luck. I have modified: /etc/security/pam_mount.conf.xml to reflect the following:

<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd"> <pam_mount> <!-- The <mntoptions> elements determine which options *may* be specified for <volume>. --> <mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other,workgroup,nosetuids,noexec,nosuid" /> <!-- All options listed in require must appear in the option list of per-user mounts. --> <mntoptions require="nosuid,nodev" /> <!-- Programs exist that do not terminate when the session is closed. pam_mount can be configured to kill these processes and optionally wait before sending signals. --> <logout wait="2" hup="0" term="yes" kill="0" /> <!-- Controls automatic creation and removal of mountpoints. --> <mkmountpoint enable="1" remove="true" /> <!-- Map \\files.fos.auckland.ac.nz\ffish001 to /home/ffish001 --> <!-- Note that nobrl option is recommended if using CIFS mounted share as home directory. Please read the manual on its implication. --> <volume fstype="cifs" server="myserver.mydomain.com" path="MADHomes$/%(USER)" mountpoint="/home/%(USER)/shit" options="workgroup=MYDOMAIN,uid=%(USER),dir_mode=0700,file_mode=700,nosuid,nodev" /> </pam_mount> 

I have also modified my pam auth configuration (/etc/pam.d/system-auth-ac) and added the following lines:

auth optional pam_mount.so try_first_pass and session optional pam_mnount.so

These changes do not seem to make a difference; I logged out and back in, but nothing mounts -- not errors, nothing. Has anyone out there dealt with this and can give me a couple pointers? Am I missing something?

Original tutorial source is [here].(https://www.sit.auckland.ac.nz/How_to_automount_CIFS/NFS_share_on_Linux_upon_logon%3F)

Any help you can provide would be much appreciated!

submitted by /u/smti
[link] [comments]

Viewing all articles
Browse latest Browse all 17781

Trending Articles