Skip navigation
VMware
11,874 Views 59 Replies Last post: Sep 27, 2006 3:39 PM by sbeaver RSS
1 2 3 4 Previous Next
julesjt777 Novice 9 posts since
Aug 9, 2006
Currently Being Moderated

Aug 9, 2006 12:16 PM

Add active directory user authentication in ESX3

I ran the esxcfg-auth command to enable and configure which domain but how do you add a user so an AD user can logon onto the server?

wunderon Hot Shot 158 posts since
Mar 2, 2006
Currently Being Moderated
1. Aug 9, 2006 12:43 PM in response to: julesjt777
Re: Add active directory user authentication in ESX3

mmm, I ran 'useradd -m ', but I use kerberos to AD.

mstahl75 Master 1,346 posts since
Feb 3, 2006
Currently Being Moderated
2. Aug 9, 2006 12:41 PM in response to: julesjt777
Re: Add active directory user authentication in ESX3

Can't you just use the VI client to connect to the ESX server and use the Re: Add active directory user authentication in ESX3User & Groups[/b] tab? I'm not sure since we haven't done AD integration.

doctormiru Enthusiast 115 posts since
Mar 30, 2006
Currently Being Moderated
3. Aug 9, 2006 1:03 PM in response to: mstahl75
Re: Add active directory user authentication in ESX3

Can't you just use the VI client to connect to the

ESX server and use the Re: Add active directory user authentication in ESX3User & Groups[/b] tab? I'm

not sure since we haven't done AD integration.

 

Hi

Yes no problem. You just have to modify the /etc/pam.d/vmware-authd file to enable kerberos authentication. I also prefer to enable active directory authentication via kerberos. To be able to authenticate to the ESX using the VI client just add the following line at the top to /etc/pam.d/vmware-authd

 

auth       sufficient /lib/security/pam_krb5.so use_first_pass

 

You'll still be able to logon with local root user.

 

regards

 

Michael

mstahl75 Master 1,346 posts since
Feb 3, 2006
Currently Being Moderated
5. Aug 9, 2006 1:18 PM in response to: julesjt777
Re: Add active directory user authentication in ESX3

Re: Add active directory user authentication in ESX3Do you need to add the user first special? /i

 

Once you have the authentication piece configured correctly I would think you just need to add the user via the command line, as Re: Add active directory user authentication in ESX3wuderon[/b] posted, though I'm not sure exactly if it will work that without kerberos, or use the VI Client and add them that way.

Quotient Expert 394 posts since
Nov 30, 2005
Currently Being Moderated
6. Aug 9, 2006 1:25 PM in response to: julesjt777
Re: Add active directory user authentication in ESX3

For those that are interested, you will notice that using esxcfg-auth to configure AD auth is just a "special" kind of Kerberos configuration, as per the contents of the script:

 

Re: Add active directory user authentication in ESX3

def enablead(option, opt, value, parser):

   Managers\['PAM'].DelModule('pam_krb5.so', 'auth')

   Managers\['PAM'].AddModule('/lib/security/$ISA/pam_krb5.so', 'auth', 'sufficient', 'likeauth', 1)

    

   Managers\['PAM'].DelModule('pam_krb5.so', 'account')

   Managers\['PAM'].AddModule('/lib/security/$ISA/pam_krb5.so', 'account', 'sufficient', None, 0)

 

   Managers\['PAM'].DelModule('pam_krb5.so', 'password')

   Managers\['PAM'].AddModule('/lib/security/$ISA/pam_krb5.so', 'password', 'sufficient', 'use_authtok use_first_pass', 1)

 

   Managers\['PAM'].DelModule('pam_krb5.so', 'session')

   Managers\['PAM'].AddModule('/lib/security/$ISA/pam_krb5.so', 'session', 'sufficient', None, 1)

 

   Services\['Kerberos'] = "True"

 

def addomain(option, opt, value, parser):

   Managers\['Kerberos'].SetKerberosRealm(value)

 

def addc(option, opt, value, parser):

   Managers\['Kerberos'].SetActiveDirectoryDomain(value)

/code

 

You still need to create the users manually using one of the methods above.

Set the UID to 0 to give the user root privilege...

 

Ben

mstahl75 Master 1,346 posts since
Feb 3, 2006
Currently Being Moderated
8. Aug 9, 2006 1:42 PM in response to: julesjt777
Re: Add active directory user authentication in ESX3

From the post above your it looks like it may already be configured if you used esxcfg-auth. Though, someone else would need to say for sure since I've never set it up.

doctormiru Enthusiast 115 posts since
Mar 30, 2006
Currently Being Moderated
9. Aug 9, 2006 11:17 PM in response to: mstahl75
Re: Add active directory user authentication in ESX3

To clear up things I'll post all the steps needed to authenticate against Active Directory.

 

Re: Add active directory user authentication in ESX3Open Firewall ESX Ports[/b]

esxcfg-firewall --openPort 88,tcp,out,KerberosClient

esxcfg-firewall --openPort 464,tcp,out,KerberosPasswordChange

 

Re: Add active directory user authentication in ESX3Enable AD and Kerberos options[/b]

esxcfg-auth --enablead --addomain domain.com --addc dc.domain.com

esxcfg-auth --enablekrb5 --krb5realm=domaon.com --krb5kdc=dc.domain.com

 

Enable Kerberos authentication through VI Client

Add the following line at the top of the file /etc/pam.d/vmware-authd

auth       sufficient   /lib/security/pam_unix_auth.so shadow nullok

 

Re: Add active directory user authentication in ESX3Check and edit the auto generated kerberos config file /etc/krb5.conf[/b]Here's mine...

\# Autogenerated by esxcfg-auth

 

\[appdefaults]

pam = {

        debug = false

        forwardable = true

        krb4_convert = false

        renew_lifetime = 36000

        ticket_lifetime = 36000

}

 

\[domain_realm]

.flhosp.net = FLHOSP.NET

example.com = EXAMPLE.COM

.example.com = EXAMPLE.COM

.domain.com= DOMAIN.COM

flhosp.net = FLHOSP.NET

domain.com = DOMAIN.COM

 

\[kdc]

profile = /var/kerberos/krb5kdc/kdc.conf

 

\[libdefaults]

ticket_lifetime = 24000

dns_lookup_realm = false

default_realm = DOMAIN.COM

dns_lookup_kdc = false

 

\[logging]

default = FILE:/var/log/krb5libs.log

admin_server = FILE:/var/log/kadmind.log

kdc = FILE:/var/log/krb5kdc.log

 

\[realms]

EXAMPLE.COM = {

        admin_server = kerberos.example.com:749

        default_domain = example.com

        kdc = kerberos.example.com:88

}

FLHOSP.NET = {

        admin_server = admin_server:749

        default_domain = flhosp.net

        kdc = flhosp.net:88

}

DOMAIN.COM = {

        admin_server = dc.domain.com:464

        default_domain = domain.com

        kdc = dc.domain.com:88

        kdc = dc2.domain.com:88

}

 

 

Re: Add active directory user authentication in ESX3Create local user objects[/b]You still have to create local users on your esx bos. But the authentication (password) will be checked against AD. Create your own script to sync AD groups and users or use the LDAP_Search script of sbeaver.

http://www.vmguru.com/files/10/scripts/entry12.aspx

 

 

Hope this helps...

 

 

regards

 

Michael

doctormiru Enthusiast 115 posts since
Mar 30, 2006
Currently Being Moderated
12. Aug 10, 2006 6:36 AM in response to: julesjt777
Re: Add active directory user authentication in ESX3

from my post above...

 

Enable Kerberos authentication through VI Client

Add the following line at the top of the file /etc/pam.d/vmware-authd

Re: Add active directory user authentication in ESX3auth sufficient /lib/security/pam_unix_auth.so shadow nullok[/b]

perhaps you might like to restart the vmware-authd service

 

 

To solve your .bash issue enshure the user has a home directory at /home and the apropriate rights.

 

Michael

Wimo Expert 573 posts since
Oct 7, 2004
Currently Being Moderated
13. Aug 10, 2006 6:38 AM in response to: doctormiru
Re: Add active directory user authentication in ESX3

What a timely thread - I need to get this done asap.

 

One question:

 

 

esxcfg-auth --enablead --addomain domain.com --addc dc.domain.com

esxcfg-auth --enablekrb5 --krb5realm=domaon.com --krb5kdc=dc.domain.com

 

Looks like this is only lets you use one specific domain controller - what if you want to add several?  Possible?  Add a list of them in this one line, like dc1.domain.com; dc2.domain.com; etc.  (and if so, separated by semicolons, commas, or what)?

 

Or just repeat the whole line with a new dc entry on each?

Mike_Laverick Virtuoso vExpert 4,279 posts since
Jan 5, 2004
Currently Being Moderated
14. Aug 10, 2006 6:47 AM in response to: Wimo
Re: Add active directory user authentication in ESX3

In the past we able to just specify the domain, as long as ESX is set up for DNS properly it query AD for SRV record to locate a DC in the domain..

 

don't know if this still applies

 

Regards

Mike

Regards Mike Laverick RTFM Education http://www.rtfm-ed.co.uk

Bookmarked By (0)

Share This Page

Communities