3

Is there a way to list/show all SPN's in an kerberized AD using a Linux Client?

In Windows one can use setspn -T <domain> -Q */* to get them. Is there something similar? Haven't found anything yet.

Or is it even possible? Of course I request a TGT with my Linux client.

Thanathan
  • 133
  • 1
  • 4

2 Answers2

0

You can use the ldapsearch tool from the openldap-client package of your favourite distro and then you can query SPN attributes like

ldapsearch -LLL -x -H ldap://example.local -D "administrator@example.local" -W -b "dc=example,dc=local,dc=com" "servicePrincipalName=*" sAMAccountName servicePrincipalName
caltuntas
  • 101
  • 1
0

I am not clear on what you are asking, do you just want a list of all SPNs in an Active Directory domain/forest from a Linux box? You can use ldapsearch for SPNs via the servicePrincipalName attribute.

TheFiddlerWins
  • 2,999
  • 1
  • 15
  • 22
  • Well in Windows I can use the setstpn -T -Q */* command to check for what services I may request a ticket. I want to do the same in Linux, being authenticated to Kerberos, having a valid TGT, which I want to use to get a TGS for a service, I may not know the name, or just for all services. I can use kvno to request a ticket for a service of course, but I need to discover the name somehow. Thats what I try to do. – Thanathan Jul 23 '15 at 13:56