Kerberos authorization to add another user

6.3k Views Asked by At

I am doing Ansible setup on Linux to connect Windows (host) machine, I have successfully connected using KERBEROS method.

I have added user using the following command:

kinit -C [email protected]

and I can check the details using klist, it showed the details tickets.

but I want to add another user i.e user_2 , when I am trying to run the kinit -C [email protected], it overrides the existing klist, I want see both tickets (user_1 & user_2)

my object is using ansible I want to run the playbook on different-different user ( user_1 , user_2)

2

There are 2 best solutions below

0
On

You cannot add an extra user to an existing ticket cache; but you can create distinct caches for distinct users, and switch context.

# new context, new ticket for other account
export KRB5CCNAME=/tmp/krb5cc_$(id -u)_biloute
kinit [email protected]
...
# switch back to default context
unset KRB5CCNAME
...
# switch again
export KRB5CCNAME=/tmp/krb5cc_$(id -u)_biloute
...
0
On

You need to switch user(su) between user_1 and user_2 using Kerberized version of 'ksu' and try klist after that.

In otherwords, use the Kerberos programs ksu in place of its non-Kerberos counterparts su. Then try klist

Thanks

Kumar