Automount Windows Active Directory shared drives in Linux

Requirements:
Likewise-open is installed and working.

Likewise-open plug in to pam to authenticate Windows AD users on a linux box. pam-mount will mount shared drives at login time using the login credentials. There is no need for samba to do this, and no need to write down your username and password in a file.

  1. Install pam-mount.
    sudo apt-get install libpam-mount
    sudo mkdir -p /media/shared_folder_name
  2. Set up shared drives to mount:
    sudo gedit /etc/security/pam_mount.conf.xml
    <!-- Volume definitions -->
    <!-- <volume fstype="cifs" server="server ip adress" user="*" path="to_shared_folder" mountpoint="shared_folder_name" /> -->
  3. Make gdm automatically mount shared folders at login:
    sudo gedit /etc/pam.d/gdm
    At the bottom of the file, add the following:
    @include common-pammount

Reboot and log in again. The shared drive should be available.

Resources:
wiki.ubuntu.com

Haridasi

About Haridasi

integrity - the state of being whole, entire, or undiminished.
This entry was posted in Linux and tagged , , . Bookmark the permalink.

One Response to Automount Windows Active Directory shared drives in Linux

  1. Nicolás Dijkstra says:

    What if i want to mount different shares depending on the user’s primary or secondary groups? I tried using sgrp attribute but it is bypassed and every volume is mounted on logon despite the user’s groups.

    I’m using Ubuntu Jaunty + Likewise Open 5 + pampib-mount

Leave a Reply

Your email address will not be published. Required fields are marked *