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

      • Feb 17th
        Reply

        I think, that if you look closely at the post date of the article above that you will find it was written during the days of RHEL 4. I think also, that if you had taken the time to investigate, you would have found that authconfig-tui did not exist on that release, and was not part of RHEL until release 5. I should also say thatauthconfig-tui supports all options of authconfig but it implies –update as the default action.

        So, before writing wise ass comments, you may want to take some time and do a little research beforehand so that it’s not you who comes off looking foolish. Just some friendly advice.

    10. nick
      Feb 17th
      Reply

      Hey there, thanks for the post.
      In a related vein, I have a RH server that used to do local NIS/Kerb authentication but now it authenticates users against an organization wide kerberos server. Everything is humming along except for cups/samba – windows users cannot connect to the print server and get an “access denied” info box. Most prominent error is the samba log stating “NT_STATUS_NO_LOGON_SERVERS”.
      Any hints on where to go from here?
      Thanks!

      • Feb 17th
        Reply

        Nick,

        It sounds like it’s not able to lookup the users domain credentials. Do you have your AD setup as part of your PAM stack?

    11. Nick
      Feb 18th
      Reply

      Cliff,
      After 2 days of trials, I did some thinking about our setup and there was really no need to do authentication on these shares so I made the security = share and that fixed my problems for now. ;)
      Thanks!

  • Leave a Reply

    Let us know what you thought.

  • Name (required):

    Email (required):

    Website:

    Message:

Visitors have tagged this post: winbind (830) - t (668) - Winbind ADS Realm (210) - winbind authentication (180) - rhel winbind (180) - redhat active directory authentication (170) - redhat Active Directory (160) - winbind active directory (151) - apache winbind (142) - redhat winbind (132) - rhel active directory (127) - authconfig winbind (115) - RHEL 5 Active directory (114) - winbind redhat (106) - winbind rhel (79) - RHEL5 active directory (75) - Redhat AD authentication (73) - red hat active directory (73) - centos active directory (68) - red hat active directory authentication (67) - apache winbind authentication (66) - redhat authentication active directory (64) - centos active directory authentication (60) - rhel active directory authentication (59) - rhel5 + active directory (53) - RHEL5 winbind (49) - rhel 5 winbind (47) - samba winbind active directory (45) - authconfig active directory (44) - red hat winbind (43) - rhel5 active directory authentication (42) - redhat 5 active directory (42) - winbind RHEL5 (41) - redhat authenticate active directory (41) - winbind rhel 5 (38) - winbind AD (38) - redhat authconfig (38) - winbind security (37) - authconfig redhat (36) - RHEL join domain (32) - rhel5 + winbind (32) - winbind ads (32) - against (32) - winbind login (31) - RHEL AD authentication (31) - linux winbind active directory (30) - rhel 5 active directory authentication (28) - rhel4 winbind (28) - rhel4 active directory (28) - redhat 5 winbind (28) - winbind auth (28) - winbind apache (28) - redhat winbind active directory (27) - redhat join active directory (26) - winbind Red Hat (26) - winbind security model (26) - active directory redhat (26) - winbind create home directory (25) - f (25) - centos user authentication against ad (25) - apache authentication winbind (24) - apache auth winbind (24) - redhat active directory howto (24) - winbind rhel4 (23) - linux winbind authentication (23) - winbind default domain (23) - winbind authconfig (22) - Red Hat 5 Active Directory (22) - winbind use default domain (22) - red hat active directory integration (22) - winbind Redhat 5 (21) - redhat active directory integration (21) - RHEL AD integration (20) - redhat and active directory (20) - join redhat to active directory (19) - rhel5 authconfig (19) - linux active directory authentication (19) - centos active directory integration (19) - centos winbind howto (19) - centos winbind authentication (19) - winbind active directory authentication (18) - redhat 5 active directory authentication (18) - winbind join domain (18) - RHEL authconfig (18) - winbind solaris (18) - winbind net join (18) - apache active directory authentication (18) - apache winbind auth (17) - centos winbind active directory (17) - active directory rhel (16) - rhel samba (16) - redhat winbind authentication (15) - samba authenticate against active directory (15) - redhat winbind "active directory" (15) - red hat authenticate active directory (15) - winbind AD authentication (15) - winbind rhel 4 (15) - red hat authentication active directory (15) - RHEL AD (15) - auth methods = winbind (15) - active directory winbind (15) - redhat samba winbind (15) - "winbind use default domain" (14) - perl active directory authentication (14) - active directory authentication redhat (14) - rhel5 join domain (14) - redhat authentication (14) - ads realm active directory (14) - active directory rhel 5 (14) - linux active directory winbind (14) - redhat active directory auth (14) - redhat enterprise linux 5 join active directory (14) - RHEL4, join domain (13) - +rhel5 +"samba (13) - red hat 5 winbind (13) - redhat winbind howto (13) - rhel pam (13) - rhel ldap active directory (13) - rhel 5 active directory integration (12) - rhel 4 winbind (12) - rhel winbind authentication (12) - winbind active directory rhel (12) - Winbind LDAP (12) - authconfig rhel (12) - rhel5 and active directory (12) - samba "stronger authentication required" (12) - RHEL 5 AD authentication (12) - join rhel to domain (12) - redhat join domain (12) - redhat active directory winbind (12) - redhat LDAP active directory (12) - winbind solaris 10 (12) - centos ad authentication (12) - centos winbind (12) - centos join active directory (12) - RHEL authenticate active directory (11) - RedHat authconfig winbind (11) - rhel5 ad (11) - RHEL join active directory (11) - rhel5 ad authentication (11) - RHEL samba winbind (11) - authconfig ads (11) - red hat AD authentication (11) - Strong(er) authentication required (11) - what is winbind ads realm (11) - centos active directory login (11) - authenticate redhat against active directory (10) - redhat authconfig active directory (10) - redhat authentication AD (10) - "redhat" + "authenticate" + "active directory" (10) -