install likewise or pbis or centrifydc
Устанавливаем необходимые пакеты
$ sudo apt-get install libpam-mount smbfs
в файле pam_mount.conf.xml
sudo nano /etc/security/pam_mount.conf.xml
Редактируем /etc/security/pam_mount.conf.xml, дополняя mntoptions
<mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other,charset,iocharset,codepage,file_mode,dir_mode" />
Добавляем в /etc/security/pam_mount.conf.xml
<volume user="*" fstype="cifs" server="server" path="share" mountpoint="~/sharedir" options="iocharset=utf8,charset=cp866,file_mode=0700,dir_mode=0700,nodev,nosuid" />
если likewise или pbis
Редактируем /etc/pam.d/common-session, меняя две строки местами
session optional pam_mount.so
session sufficient pam_lsass.so
для centrifydc
The /etc/pam.d/common-auth also needs to be edited to change the order
of the authentication modules. Make sure auth sufficient
pam_centrifydc.so is on the second line and add try_first_pass to avoid
domain users entering their passwords twice before they are logged in. Also,
confirm auth optional pam_mount.so is on the first line. If not
include it.
Also, add try_first_pass to pam_unix.so line to prevent local machine users
from entering their passwords twice before they are logged on.