• So you have a RHEL system and you want to authenticate it against your active directory. The good news is that Red Hat has made it easy for you to do this. The bad news is that they only get the most basic structure working for you. Here I will show you how to get WinBind authentication working using Authconfig, and how make it a little more seamless than this utility leaves it off.

    It should be noted that while this works perfectly well, it is really not the best way to authenticate users against a UNIX host. Given the option, having your users in Open Ldap and PAM authenticating them against that would be a much better option. However, we don’t live in a perfect world, and sometimes we just have to make things work.

    Let’s start by using authconfig to join your machine to the domain. This should all be done as the root user.

    # authconfig

    • Select “Use Winbind” and Use “Winbind Authentication”. Remember to leave “Cache Information”, “Use MD5 Passwords” and “Use Shadow Passwords” selected.
    • Select “Next”
    • Under “Security Model” select “ads”
    • “Domains:” examplead (substatute with the name of your Active Directory)
    • “Domain Controllers:” adserver.domain.com (Again, substitute with the name of your Active Directory server)
    • “ADS Realm:” ADSERVER.DOMAIN.COM
    • “Template Shell:” /bin/bash
    • Select “Join Domain”
    • Select “OK”

    Now your machine should be be on the domain. Test it to make sure you can see your AD users:

    # wbinfo -u

    You should see your users in the list.

    The only problem is that to do anything with them, you have to express their user name in that annoying way Windows likes you to. Something like this:

    “EXAMPLEAD\\username”

    Not very usefull. To get around this, simply edit “/etc/samba/smb.conf” and change this line:

    winbind use default domain = no

    to this:

    winbind use default domain = yes

    You should now be able to express AD usernames without the domain nonsense before it. Try it:

    # finger username
    Login: username                            Name: Username
    Directory: /home/EXAMPLEAD/username        Shell: /bin/bash
    Never logged in.
    No mail.
    No Plan.
    

    Finally check your “/etc/nsswhich.conf” file to make sure RHEL knows to use WinBind. Authconfig should have set this up for you, and it should have lines that look like this:

    passwd:     files winbind
    shadow:     files winbind
    group:      files winbind
    

    That should do it you should be able to create home directories for all your AD users and let them authenticate away. Have fun.

    This entry was posted on Wednesday, April 11th, 2007 at 4:12 pm and is filed under Data and Technology. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
  • 8 Comments

    Take a look at some of the responses we've had to this article.

    1. Mont
      May 17th
      Reply

      How does this get the username and password of a domain administrator that has the ability to add the computer to the domain? Or must “net ads join” be used if a username and password is required to add a user?

      Thanks,
      -Mont

    2. May 17th
      Reply

      Hi Mont,
      If I remember correctly, authconfig asks for this information before it attempts to join the machine to the domain.

    3. Mont
      May 17th
      Reply

      Thanks, I’ll give it a try. I had specifically read something that had said not to join the domain from within authconfig so I was curious when I saw your post.

    4. May 18th
      Reply

      Hey Mont,
      Let me know how it goes. I confess that I needed to get this task done quickly, so I saw authconfig as my best bet. I know there is a way to do it on the command line as well. It pretty much just worked for me, so hopefully it will do the same for you :)

    5. Greywolf
      Oct 29th
      Reply

      I’m looking for a way to provide single-sign-on to an environment without having to explicitly configure every single UNIX client to join the domain and auth against the ADS; my thought was to set up an LDAP server which would perform the authentication against the ADS by proxy.

      Is this possible? I have Solaris, HP and Linux clients, all of which I wish to be able to use single-sign-on.

      Help?

    6. [...] If you want to avoid entering the logon name as domainnameusername, then it is possible to configure a default domain for Winbind to use. [...]

    7. Jun 3rd
      Reply

      how to configure a squid server
      all commands step by step

    8. Follow these instructions to have your users directories automatically created….

      http://kbase.redhat.com/faq/FAQ_43_5367.shtm

  • Leave a Reply

    Let us know what you thought.

  • Name (required):

    Email (required):

    Website:

    Message:

Visitors have tagged this post: t (668) - winbind (280) - rhel winbind (87) - RHEL 5 Active directory (73) - apache winbind (70) - authconfig winbind (65) - winbind authentication (61) - rhel5 + active directory (53) - redhat active directory authentication (49) - rhel active directory (45) - winbind rhel (42) - redhat winbind (41) - apache winbind authentication (38) - rhel5 + winbind (32) - against (32) - winbind redhat (31) - redhat authconfig (29) - Winbind ADS Realm (28) - rhel 5 winbind (27) - winbind active directory (27) - f (25) - winbind rhel 5 (24) - rhel active directory authentication (24) - winbind RHEL5 (24) - redhat 5 active directory (23) - RHEL5 active directory (23) - redhat Active Directory (22) - rhel4 winbind (20) - authconfig active directory (20) - rhel5 active directory authentication (19) - winbind AD (18) - winbind login (18) - winbind rhel4 (17) - winbind ads (16) - authconfig redhat (16) - redhat winbind authentication (15) - redhat winbind "active directory" (15) - Redhat AD authentication (15) - redhat authentication active directory (15) - "winbind use default domain" (14) - rhel5 authconfig (14) - winbind authconfig (14) - red hat winbind (14) - apache authentication winbind (14) - apache auth winbind (14) - RHEL4, join domain (13) - +rhel5 +"samba (13) - winbind join domain (13) - redhat 5 winbind (13) - winbind security (13) - RHEL5 winbind (13) - rhel 5 active directory authentication (12) - perl active directory authentication (12) - rhel4 active directory (12) - linux winbind authentication (12) - samba "stronger authentication required" (12) - apache winbind auth (12) - winbind security model (12) - winbind AD authentication (11) - winbind rhel 4 (11) - Winbind LDAP (11) - rhel samba (11) - active directory rhel 5 (11) - RHEL authconfig (11) - winbind solaris (11) - Strong(er) authentication required (11) - winbind default domain (11) - winbind use default domain (11) - samba authenticate against active directory (10) - winbind active directory authentication (10) - red hat active directory authentication (10) - "redhat" + "authenticate" + "active directory" (10) - Red Hat 5 Active Directory (10) - samba winbind active directory (10) - rhel 5 active directory integration (9) - RHEL join domain (9) - RedHat authconfig winbind (9) - active directory rhel (9) - RHEL AD (9) - winbind Redhat 5 (9) - winbind net join (9) - winbind auth (9) - authconfig ads (9) - RHEL AD authentication (9) - red hat active directory (9) - redhat authentication (8) - winbind how to (8) - red hat 5 winbind (8) - winbind "security model" (8) - winbind home directory (8) - Strong(er) authentication required samba (8) - rhel5 ad authentication (8) - RHEL 5 AD authentication (8) - "redhat" active directory (8) - apache active directory authentication (8) - authconfig rhel5 (8) - winbind apache (8) - rhel samba active directory (7) - red hat authenticate active directory (7) - redhat winbind howto (7) - ads realm active directory (7) - winbind authentication REDHAT (7) - winbindd rhel (7) - redhat active directory winbind (7) - authenticate redhat to active directory (7) - winbind RHEL 3 (7) - RHEL5 ldap active directory (7) - redhat authconfig active directory (6) - rhel 4 winbind (6) - samba rhel5 (6) - rhel winbind authentication (6) - rhel5 ad (6) - redhat 5 active directory authentication (6) - rhel5 samba active directory (6) - RHEL AD integration (6) - solaris join active directory (6) - winbind auth user (6) - redhat and active directory (6) - rhel pam (6) - redhat winbind ads (6) - RHEL5 AD integration (6) - joining rhel5 to active directory (6) - linux authentication against active directory (6) - redhat join active directory (6) - winbind solaris 10 (6) - redhat authenticate against active directory (6) - samba active directory auth rhel (6) - winbind net ads (6) - auth methods = winbind (6) - redhat authenticate active directory (6) - authenticate redhat against active directory (5) - authconfig smb (5) - authenticating linux against active directory (5) - Using Winbind authentication (5) - authconfig rhel (5) - winbind active directory redhat (5) - rhel5 and active directory (5) - rhel 3 active directory (5) - red hat "active directory" winbind (5) - winbind Strong(er) authentication required (5) - RHEL join active directory (5) - redhat 5 ad authentication (5) - ldap rhel active directory (5) - "active directory" winbind (5) - rhel5 ad auth (5) - rhel4 join ad domain (5) - linux winbind auth (5) - rhel5 join active directory (5) - linux ad authentication winbind (5) - linux active directory winbind (5) -