Skip to main content

Mount your Samba Shares without password or sudo

Mount.cifs no sudo and no password

These instructions are for Debian.

You need to have configure winbind to. use pam auth
>sudo pam-auth-update

Install required packages
>sudo apt-get install libpam-mount hxtools cifs-utils
>sudo pam-auth-update Check Mount option is enabled

edit /etc/security/pam_mount.conf.xml and add your mount details
<!-- Volume definitions -->
<volume user="*" sgrp="domain users" fstype="cifs" server="fileserver" path="server_share" mountpoint="local_mount" options="sec=krb5,cruid=%(USERUID),rw"/>

  1. The user must have access to the directory of the share on the fileserver
  2. The user must be able to mkdir in your mountpoint
  3. You can mount sub directories of shares
  4. There is no need for any entries in /etc/fstab
  5. Test your mount in commandline first as error checking is difficult

There are other options your can set as required and this will mount shares when you login via Desktop GUI or ssh