Skip to main content

How to mount a Windows SMB/CIFS share via PAM

Comments

3 comments

  • Josef Petermann

    Hello Ralf,
    thanks for the useful article.

    Is it possible to combine pam_mount with kerberos, so that a kerberised user automatically mounts a cifs share with his own kerberos ticket on login?

    Thanks,
    Josef

    0
  • Ralf Stubner

    Hello Josef,

    I have never tried that myself, but in the end `pam_mount` only issues `mount` commands and `mount.cifs` in particular supports Kerberos authentication. See the sec=... mount options in mount.cifs(8) (https://linux.die.net/man/8/mount.cifs). Within pam_mount.conf.xml you can specify such options using an options attribute of the volume element.

    HTH
    Ralf

    0
  • Edgar Castro

    FYI for anyone attempting to implement this in RHEL 9, as of this post, the pam_mount package is not available. I'm currently trying a 3rd party implementation of it to see if it will work. Also, when I tested in RHEL 8, I found I had to add options to my volume definitions, as it was somehow not seeing the domain suffix how we needed it and it wouldn't work with the naming scheme we used on our CIFS, so had to add:
    options='domain="

    0

Article is closed for comments.