LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   CentOS and Active Directory Integration (https://www.linuxquestions.org/questions/linux-server-73/centos-and-active-directory-integration-4175466772/)

Dennis3 06-20-2013 02:04 PM

CentOS and Active Directory Integration
 
Hi everyone,

I would like to integrate CentOS Linux into Active Directory. I have two virtual machines :
1. Microsoft Windows Server 2008 R2
2. CentOS 6.4

Using Samba4-winbind, I managed to join the machine into the domain and authenticate with a user from the directory as well.

I want a setup that will automatically assign a specific home directory for users that log in through Linux (e.g Dennis(user from AD) logs in through CentOS, his home directory will be a local folder on the Windows machine or some other storage machine).

I would like to know if these configuration can be done through Windows and not through Linux. What are my options if any ?

Thank you,
Dennis.

szboardstretcher 06-20-2013 02:22 PM

There is a [homes] section in the smb.conf that you can set up. And additionally you can make login scripts for the users to auto-mount a windows share.

Is that what you are looking for?

Ser Olmy 06-20-2013 02:32 PM

Quote:

Originally Posted by Dennis3 (Post 4975558)
I want a setup that will automatically assign a specific home directory for users that log in through Linux (e.g Dennis(user from AD) logs in through CentOS, his home directory will be a local folder on the Windows machine or some other storage machine).

Do you mean you want to automatically mount a remote share and use it as a home directory whenever a user defined in Active Directory logs in to the CentOS system?

If so, you may need to look at PAM. The pam_mkhomedir module can be used to create a home directory to serve as a mount point if none exists, and pam_mount can be used to mount a shared directory on another system.

Perhaps this or this can point you in the right direction. The second link includes an example Perl script as an alternative to pam_mount, one that retrieves the home directory definition from AD and mounts the shared directory using the existing Kerberos ticket. Very elegant.

Dennis3 06-20-2013 02:36 PM

Quote:

Originally Posted by szboardstretcher (Post 4975569)
There is a [homes] section in the smb.conf that you can set up. And additionally you can make login scripts for the users to auto-mount a windows share.

Is that what you are looking for?

Two questions :
1. What exactly can I specify under [homes] parameter to make it happen ?
2. All the users do not exist locally on the linux machine, rather on the Active Directory. Where can I add the logon script to ?

Sorry if it's a silly question, I find it hard to understand since my knowledge with Active directory integration is limited.

Thank you,
Dennis.


All times are GMT -5. The time now is 10:19 PM.