[SSSD] debbuging, how to turn off cache

steve steve at steve-ss.com
Tue Apr 16 08:44:08 UTC 2013


On 16/04/13 10:02, John Hodrien wrote:
> On Tue, 16 Apr 2013, steve wrote:
>
>> Hi again
>> OK, I found it. sss_cache
>>
>> Unfortunately it gives an error even if a correct switch and domain 
>> are given:
>>
>>  sudo sss_cache -d default
>> Usage: sss_cache [-?UGNSA] [-?|--help] [--usage] [-u|--user=STRING]
>>         [-U|--users] [-g|--group=STRING] [-G|--groups]
>>         [-n|--netgroup=STRING] [-N|--netgroups] [-s|--service=STRING]
>>         [-S|--services] [-a|--autofs-map=STRING] [-A|--autofs-maps]
>>         [-d|--domain=STRING]
>> Please select at least one object to invalidate
>> (Tue Apr 16 09:37:15:820975 2013) [sssd] [main] (0x0020): Error 
>> initializing context for the application
>>
>> The other switches, e.g. sss_cache -u steve2 works OK.
>>
>> sssd 1.9.4
>
> Surely that should be:
>
> sss_cache -d default -UG
>
> or just
>
> sss_cache -UG
>
> But to be honest, I'd favour the more brutal technique while debugging.
> sss_cache invalidates the cache, but if sssd can't contact the LDAP 
> servers
> it'll still serve from cache I thought.  I may be wrong on that point 
> though.
>
> I've always gone for the completely unambiguous:
>
> service sssd stop
> rm -f /var/lib/sss/{db,mc}/* /var/log/sssd/*
> service sssd start
>
> That way, I'm clear that it knew nothing, and that the logs I'm 
> looking at are
> 100% from the current config.
>
> jh
Hi
Thanks for the syntax. It works perfectly now. Good advice about the 
brutal technique too.

I'm actually trying to debug a bash script which runs getent passwd 
<user>. On Ubuntu it seems that getent is run in a different process as 
it returns nothing. The same script on openSUSE returns as expected. I 
know it's OT but any ideas how to get output from getent in an Ubuntu 
bash script?
Cheers,
Steve




More information about the sssd-devel mailing list