2

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://corporate.company.com -> Base DN: dc=corporate,dc=company,dc=com" This does not authentication users with Microsoft LDAP

jscott
  • 24,204
  • 8
  • 77
  • 99
TusharG
  • 23
  • 5

3 Answers3

2

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.

wolfgangsz
  • 8,767
  • 3
  • 29
  • 34
1

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

user18330
  • 174
  • 1
  • 6
0

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

nickgrim
  • 4,336
  • 1
  • 17
  • 27