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?
mmm, I ran 'useradd -m ', but I use kerberos to AD.
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.
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
I still do not follow how you login with an AD account.
domain = domain
I added the line to the vmware-authd file but still can't login into shell with domain\user
How does it know to look for that user even though that user does not exist local in any form.
Do you need to add the user first special?
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.
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)
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
How do you enable krb5
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.
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
That worked great! Thanks
Actually all worked well I can putty in and use my AD account but I can VI Client in, it says bad username or password.
How can I finalize the final piece and allow VI Client access with the user I created within putty using useradd -m username
Plus even though I log in correctly I get a permission denied access on .bashrc
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
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?
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