• 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.
  • 9 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

    9. your_mother
      Apr 30th
      Reply

      The command is supposed to be authconfig-tui in the article above, genius.

  • Leave a Reply

    Let us know what you thought.

  • Name (required):

    Email (required):

    Website:

    Message:

Visitors have tagged this post: t (668) - winbind (606) - rhel winbind (131) - winbind authentication (118) - apache winbind (112) - rhel active directory (101) - redhat active directory authentication (101) - RHEL 5 Active directory (96) - authconfig winbind (93) - Winbind ADS Realm (82) - redhat Active Directory (80) - winbind active directory (76) - redhat winbind (73) - winbind redhat (72) - winbind rhel (66) - RHEL5 active directory (58) - rhel5 + active directory (53) - apache winbind authentication (52) - red hat active directory (43) - rhel active directory authentication (42) - rhel 5 winbind (40) - Redhat AD authentication (39) - red hat active directory authentication (36) - redhat 5 active directory (35) - winbind rhel 5 (33) - rhel5 + winbind (32) - against (32) - authconfig redhat (31) - redhat authconfig (30) - winbind RHEL5 (30) - winbind ads (29) - redhat authenticate active directory (29) - winbind AD (28) - redhat authentication active directory (28) - red hat winbind (27) - winbind security (27) - rhel4 winbind (26) - rhel5 active directory authentication (26) - authconfig active directory (25) - f (25) - RHEL5 winbind (24) - redhat 5 winbind (23) - winbind login (23) - apache auth winbind (22) - rhel4 active directory (21) - winbind rhel4 (21) - winbind use default domain (21) - rhel 5 active directory authentication (20) - winbind apache (20) - winbind security model (20) - samba winbind active directory (20) - apache authentication winbind (19) - RHEL join domain (18) - rhel5 authconfig (17) - winbind authconfig (17) - linux winbind authentication (17) - Red Hat 5 Active Directory (17) - RHEL AD authentication (17) - winbind active directory authentication (16) - apache active directory authentication (16) - winbind auth (16) - apache winbind auth (16) - winbind default domain (16) - redhat winbind authentication (15) - redhat winbind "active directory" (15) - linux winbind active directory (15) - linux active directory authentication (15) - redhat join active directory (15) - red hat active directory integration (15) - "winbind use default domain" (14) - samba authenticate against active directory (14) - winbind AD authentication (14) - winbind join domain (14) - winbind rhel 4 (14) - rhel samba (14) - redhat and active directory (14) - RHEL authconfig (14) - winbind net join (14) - RHEL4, join domain (13) - perl active directory authentication (13) - active directory rhel (13) - +rhel5 +"samba (13) - red hat authenticate active directory (13) - active directory rhel 5 (13) - red hat authentication active directory (13) - winbind Redhat 5 (13) - winbind solaris (13) - winbind Red Hat (13) - centos active directory authentication (13) - rhel 5 active directory integration (12) - samba "stronger authentication required" (12) - RHEL 5 AD authentication (12) - active directory winbind (12) - centos active directory (12) - join redhat to active directory (11) - RedHat authconfig winbind (11) - Winbind LDAP (11) - winbind create home directory (11) - RHEL AD (11) - rhel pam (11) - Strong(er) authentication required (11) - auth methods = winbind (11) - active directory redhat (11) - authenticate redhat against active directory (10) - rhel 4 winbind (10) - active directory authentication redhat (10) - "redhat" + "authenticate" + "active directory" (10) - redhat 5 active directory authentication (10) - red hat 5 winbind (10) - ads realm active directory (10) - rhel5 ad authentication (10) - authconfig ads (10) - redhat active directory winbind (10) - redhat active directory auth (10) - winbind solaris 10 (10) - redhat winbind active directory (10) - redhat authconfig active directory (9) - rhel5 join domain (9) - redhat authentication (9) - RHEL AD integration (9) - Strong(er) authentication required samba (9) - linux winbind auth (9) - authenticate redhat to active directory (9) - redhat authenticate against active directory (9) - RHEL5 ldap active directory (9) - redhat active directory integration (9) - redhat samba winbind (9) - redhat authentication AD (8) - rhel samba active directory (8) - rhel winbind authentication (8) - winbind active directory rhel (8) - winbind how to (8) - redhat winbind howto (8) - winbind "security model" (8) - winbind home directory (8) - redhat 5 ad authentication (8) - RHEL samba winbind (8) - "redhat" active directory (8) - linux active directory winbind (8) - winbind authentication REDHAT (8) - join rhel to domain (8) - authentication winbind (8) - authconfig rhel 5 (8) - RHEL5 AD integration (8) - joining rhel5 to active directory (8) - authconfig rhel5 (8) - redhat active directory howto (8) - rhel winbind howto (8) - active directory rhel5 (8) - samba Strong(er) authentication required (8) -