Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to do following things:

  1. Login to CentOS over ssh: authentication needs to happen with Microsoft Ldap
  2. On successful login create a home directory for user in /home if directory exists take him to his home directory
  3. Put quota on /home/user directory of 5 GB

Can someone please show me a link for Centos/redhat to authorize users with Microsoft Ldap?

I have already tried: setup command from root -> "Authentication configuration" -> "[] User Information -> Use Ldap" -> Authentication -> [] Use Ldap Authentication" -> []/[*] Use TLS -> Server: ldap:// -> Base DN: dc=corporate,dc=company,dc=com" This does not authentication users with Microsoft LDAP

share|improve this question
up vote 2 down vote accepted

The "authenticate linux user against AD" part was extensively covered here.
For part 2 of your question you will probably need to put a little script into your /etc/bash.bashrc file (if your users use bash, otherwise you'll need to find out which file is run for that user's particular shell). Same goes for part 3 of your question.

share|improve this answer

You have to manually edit your ldap.conf file. MSFT AD requires that a user be authenticated to even lookup a user account in AD. Create a user account in AD that's just for doing LDAP lookups.

binddn cn=ldap_user,cn=Users,dc=echostar,dc=com bindpwd secretbinddn cn=ldap_user,cn=Users,dc=company,dc=com bindpwd password_gones_here

share|improve this answer

For part 2, you can use pam_mkhomedir to automatically create a user's home-directory if it doesn't exist.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.