Tuesday, 17 March 2009

Auto-mount of windows shares on Ubuntu login

Based on https://wiki.ubuntu.com/MountWindowsSharesPermanently and updated:

$ sudo apt-get install libpam-mount smbfs
$ echo "@include common-pammount" | sudo tee -a /etc/pam.d/gdm
$ echo "@include common-pammount" | sudo tee -a /etc/pam.d/login

fix up server= and mountpoint= below

$ sed -i -e '/<!-- Volume definitions -->/a<volume user="*" fstype="cifs" server="" path="users/%(USER)" mountpoint="/home/%(USER)/ntfs" options="uid=%(USERUID),gid=%(USERGID),iocharset=utf8,fmask=0770,dmask=0770" />' /etc/security/pam_mount.conf.xml

Make sure unix password is same as windows password and unix username same as windows username unless we use ldap in nis, but thats another story…

No comments:

Post a Comment