On (24/03/17 16:44), smfrench(a)gmail.com wrote:
When debugging sssd it would be nice to be able to do various
operations that getent can't do (e.g. 'name-to-sid' or 'sid-to-uid'
etc.) or nss is not configured to do (testing that auth works e.g.) and the wbinfo tools
has a pretty good list of the typical things that an admin or developer would want to do
to test sssd or winbind, but ... I couldn't find an sssd equivalent of wbinfo and it
looks like this is a know issue, e.g. I saw this thread
Is there any work in progress on an sssd equivalent of wbinfo?
You can use python bindings for similar purpose
group = 'Domain Users'
group_id = grp.getgrnam(group).gr_gid
group_sid = # set group SID value here as string
user = 'user1_dom1-19661'
user_id = pwd.getpwnam(user).pw_uid
user_sid = # set user SID value here as string
output = pysss_nss_idmap.getsidbyname('Domain Users')['Domain Users']
assert output[pysss_nss_idmap.TYPE_KEY] == pysss_nss_idmap.ID_GROUP