Esx Authentication AD
Esx Authentication AD
The user name and password database kept by the Service Console is independent of the virtual machines' user name and password databases. A user need not be registered with the Service Console in order to use a virtual machine, just as someone can use a physical computer without being authorized to administer it. By default, the user names and passwords for users of the Service Console are stored in the Service Console. Some organizations may prefer to use an external password store. The advantage of doing so is that users need not remember an additional password. The disadvantage of doing so is that a new dependency has been introduced: users may be unable to log in to ESX Server if the password store goes down or if network connectivity is lost. This document contains a way to mitigate the risk.
Continue with this document if your Active Directory domain is in native mode, or if you plan to migrate your mixed mode domain to native mode in the future.
[logging] default = FILE:/var/log/krb5libs.log kdc = FILE:/var/log/krb5kdc.log admin_server = FILE:/var/log/kadmind.log [libdefaults] ticket_lifetime = 24000 default_realm = TEXAS.ORG dns_lookup_realm = false dns_lookup_kdc = false [realms] TEXAS.ORG = { kdc = AD.TEXAS.ORG:88 admin_server = AD.TEXAS.ORG:464 default_domain = texas.org } [domain_realm] .texas.org = TEXAS.ORG texas.org = TEXAS.ORG [kdc] profile = /var/kerberos/krb5kdc/kdc.conf [pam] debug = false ticket_lifetime = 36000 renew_lifetime = 36000 forwardable = true krb4_convert = false Use the text editor of your choice to create the /etc/krb5.conf file. ESX Server includes the vi and Nano editors. If you are not familiar with vi, use the easier Nano editor. If you use Nano, make sure to run it with the -w flag to disable line wrap. For example: nano -w /etc/krb5.conf Type in the data file as shown above. Substitute your own Active Directory domain name in place of TEXAS.ORG. Substitute the name of a domain controller for the domain in place of AD.TEXAS.ORG. Follow the uppercase/lowercase pattern shown in the sample above. When you are satisfied with your work, save your file and exit. Make sure you check your work. You can display the file to the screen with the following command: more /etc/krb5.conf This displays the file, one screen at a time. Press the space bar to advance to the next screen, or press q to stop displaying the file before you reach the end. Ensure that the hostname you gave for your Active Directory controller is correct. If your controller had as its hostname AD.TEXAS.ORG, you should be able to ping it from the ESX Server computer with the following command: ping AD.TEXAS.ORG You must also create a file called kdc.conf. Cryptographic keys are at the heart of Kerberos operation, and this configuration file describes how your ESX Server computer interacts with the Key Distribution Center that Active Directory provides.
First, you must create the directory in which this file resides. Enter the following command: mkdir p /var/kerberos/krb5kdc Now change to that directory: cd /var/kerberos/krb5kdc Edit the kdc.conf file. Enter the following text: acl_file = /var/kerberos/krb5kdc/kadm5.acl dict_file = /usr/share/dict/words admin_keytab = /var/kerberos/krb5kdc/kadm5.keytab v4_mode = nopreauth [realms] TEXAS.ORG = { master_key_type = des-cbc-crc supported_enctypes = des3-cbc-raw:normal des3-cbc-raw:norealm des3-cbc-raw:onlyrealm des3-cbc-sha1:normal des3-cbc-sha1:norealm des3-cbc-sha1:onlyrealm des-cbc-crc:v4 des-cbc-crc:afs3 des-cbc-crc:normal des-cbc-crc:norealm des-cbc-crc:onlyrealm des-cbc-md4:v4 des-cbc-md4:afs3 des-cbc-md4:normal des-cbc-md4:norealm des-cbc-md4:onlyrealm des-cbc-md5:v4 des-cbc-md5:afs3 des-cbc-md5:normal des-cbc-md5:norealm des-cbc-md5:onlyrealm des-cbc-raw:v4 des-cbc-raw:afs3 des-cbc-raw:normal des-cbc-raw:norealm des-cbc-raw:onlyrealm des-cbc-sha1:v4 des-cbc-sha1:afs3 des-cbc-sha1:normal des-cbc-sha1:norealm des-cbc-sha1:onlyrealm } Substitute the name of your Active Directory domain for TEXAS.ORG. To avoid the tiresome chore of typing in the above file, you can copy the text above from this document, within Acrobat, using the Select Text option in the Basic Tool Bar. (If you are reading a hard copy of this document you can find an online copy using the Search feature on www.vmware.com). Edit the file if necessary, confirming that it looks like the above. Do not forget to include the name of your Active Directory domain.
The first line of this file is a comment, identifying the current version of PAM. The second line says that users must authenticate themselves using a user name and password as stored on the local system. The third line says that users must also have an account on the local system. The effect of this file is to limit users of all VMware-related services to local users known to the Service Console. You must modify this file so that users may log in using local user names and passwords, but in the event that their password is not known locally, it must be known to the Windows Active Directory domain. Edit the file /etc/pam.d/vmware-authd. Starting at the first letter of the word required on the first auth line, change the word required to read sufficient. Open a new line at the bottom of the file and type in the following: auth required /lib/security/pam_krb5.so use_first_pass Use spaces or tabs to separate words. It is not necessary to align columns. When you have typed in the above line, save and exit the file. When you are done, your /etc/pam.d/vmware-authd file should look like this: #%PAM-1.0 auth sufficient /lib/security/pam_unix_auth.so shadow nullok account required /lib/security/pam_unix_acct.so auth required /lib/security/pam_krb5.so use_first_pass Your ESX Server system is now ready to authenticate MUI and Remote Console users against an Active Directory domain. No reboot or service restart is necessary.
Server is equivalent to giving them all access to the server room and giving them all a budget to purchase hardware. Q. Must the ESX Server computer join the domain? A. No. Q. What if my ESX Server computer loses network access to all the domain controllers? Will virtual machines shut down? A. Virtual machines will continue to run. ESX Server users who are not defined locally will not be able to log in to administer their machines. VMware recommends that, at a minimum, the root password be maintained locally on the Service Console; do not attempt to map this to the Administrator login in the domain. This way, authorized personnel will always be able to log in as root even if contact with the domain is lost. Q. Does this technique work on all versions of ESX Server? A. This information has been tested on ESX Server 2.1 only. You can find information for ESX Server 1.5 and 2.0 in the VMware Technical Note Active Directory Login. Q. What if I want to use my Windows domain to authenticate other kinds of Service Console logins, such as FTP or SSH logins? A. PAM allows you to do so, although the setup is outside the scope of this document. See the Further Reading section below for pointers to more information on PAM. Q. Authentication fails or works for some users, but not for others. A. Due to a bug in the version of Kerberos shipped with ESX Server 2.1, users who are members of more than 15 global groups will fail to authenticate, even if the users supply the correct password. There is currently no workaround or fix for ESX 2.1.
Further Reading
The Pluggable Authentication Module system is documented here: www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam.html Kerberos is documented here: web.mit.edu/kerberos/www/ Microsoft Active Directory is documented here: www.microsoft.com/windows2000/technologies/directory/ad/default.asp
VMware, Inc. 3145 Porter Drive Palo Alto, CA 94304 www.vmware.com Copyright 1998-2005 VMware, Inc. All rights reserved. Protected by one or more of U.S. Patent Nos. 6,397,242, 6,496,847, 6,704,925, 6,711,672, 6,725,289, 6,735,601, 6,785,886, 6,789,156 and 6,795,966; patents pending. VMware, the VMware boxes logo and design, Virtual SMP and VMotion are registered trademarks or trademarks of VMware, Inc. in the United States and other jurisdictions. Microsoft, Windows and Windows NT are registered trademarks of Microsoft Corporation. Linux is a registered trademark of Linus Torvalds. All other marks and names mentioned herein may be trademarks of their respective companies. Revision: 20050303 Item: ESX-ENG-Q104-070