Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 05-30-2023 03:48 AM
Hi Team,
I want to setup kerberos client in my Mac Laptop having MacOS Monterey (version 12.6.5). I have put the krb5.conf file at below paths.
/etc/krb5.conf
/Library/Preferences/edu.mit.kerberos
But when I try to run kinit, i get gelow error.
--
kinit -kt /Users/banshidhar_sahoo/Desktop/POC_KEYTAB/test.headless.keytab [email protected]
kinit: krb5_get_init_creds: unable to reach any KDC in realm EXAMPLE.COM, tried 0 KDCs
--
I have also set the ENV Variable as below:
KRB5_CONFIG=/etc/krb5.conf
But getting same error while doing kinit.
Can you please suggest how to point to krb5.conf so that it can reach out to the correct kdc server.
Regards,
Banshi.
Created 05-30-2023 07:29 PM
The issue got fixed after making below 2 changes in /etc/krb5.conf file
1. Issue was a include line in my /etc/krb5.conf file which was not valid.
Removed below from /etc/krb5.conf
"includedir /etc/krb5.conf.d/"
2. On macOS the default client does not fall back to TCP. In krb5.conf prefix kdc value with tcp/ to force the client to use TCP if your corporate network blocks UDP.
kdc = tcp/kdc.example.com:88
Regards,
Banshi.
Created 05-30-2023 05:25 AM
@banshidhar_saho I am assuming you are not using @EXAMPLE.COM. Have you confirmed that your client (mac os) has network and dns connectivity with the KDC Host?
There's a few things you must do to configure it properly:
Created 05-30-2023 06:44 AM
Hi @steven-matison You are right. I have replaced actual REALM with EXAMPLE.COM while posting.
I have checked connectivity using "nc -zv" and "ping" command. Connectivity is fine.
====
nc -zv <kdc_server_VIP> <KDC_Port>
Connection to xxxxxxxx port xxxxxx [tcp/sqlexec] succeeded!
====
--- <kdc_server_VIP> ping statistics ---
13 packets transmitted, 12 packets received, 7.7% packet loss
====
"kinit: krb5_get_init_creds: unable to reach any KDC in realm EXAMPLE.COM, tried 0 KDCs"
By seeing the above error, I feel it's not able to locate the krb5.conf file.
When we run kinit command, is it referring to /etc directory for krb5.conf file or some other location in Mac machine?
Regards,
Banshi.
Created 05-30-2023 07:29 PM
The issue got fixed after making below 2 changes in /etc/krb5.conf file
1. Issue was a include line in my /etc/krb5.conf file which was not valid.
Removed below from /etc/krb5.conf
"includedir /etc/krb5.conf.d/"
2. On macOS the default client does not fall back to TCP. In krb5.conf prefix kdc value with tcp/ to force the client to use TCP if your corporate network blocks UDP.
kdc = tcp/kdc.example.com:88
Regards,
Banshi.