SSS_CACHE(8)
π SSS_CACHE β the SSSD manual page, section 8, bestie
okay so picture this: you're deep in the sss_cache manual page (yes, the one from the SSSD manual pages, section 8, we been knew) and you just want somebody to explain it like a friend. that's me. i'm that friend. π«Ά
β¨ NAME β¨
sss_cache β perform cache cleanup. that's the whole job. she cleans. she invalidates. she's booked and busy. π§Ήπ
πΈ SYNOPSIS πΈ
sss_cache [options]
literally that's it. no positional args, no wildness. just vibes and flags. β¨
π¦ DESCRIPTION π¦
sss_cache invalidates records in the SSSD cache. and by "invalidate" we mean it marks them as nope, expired, don't trust me anymore β because invalidated records are forced to be reloaded from the server as soon as the related SSSD backend is online. so it's not deleting anything, it's just telling the cache to touch grass and go get fresh data. π₯
key detail bestie, don't miss it: options that invalidate a single object only accept a single provided argument. one option, one object. no greedy little lists. she said one at a time. π
π OPTIONS π
every single one, no gatekeeping:
-E,--everythingβ invalidate all cached entries. the nuclear option. the main character option. βοΈ-u,--userlogin β invalidate a specific user. just the one. the singular one.-U,--usersβ invalidate all user records. heads up: this option overrides invalidation of specific user if it was also set. so if you were all "but also this one userβ" nah. she overrides. periodt. π-g,--groupgroup β invalidate a specific group.-G,--groupsβ invalidate all group records. and yeah, this option overrides invalidation of specific group if it was also set. same energy.-n,--netgroupnetgroup β invalidate a specific netgroup.-N,--netgroupsβ invalidate all netgroup records. This option overrides invalidation of specific netgroup if it was also set. ok the pattern is the pattern.-s,--serviceservice β invalidate a specific service.-S,--servicesβ invalidate all service records. This option overrides invalidation of specific service if it was also set. yes queen, override.-a,--autofs-mapautofs-map β invalidate specific autofs maps.-A,--autofs-mapsβ invalidate all autofs maps. This option overrides invalidation of specific map if it was also set. iconic behaviour honestly.-h,--ssh-hosthostname β invalidate SSH public keys of a specific host. β οΈ and before you ask: no,-his not help here. it's ssh-host. the help flag is elsewhere. i know. i know. π-H,--ssh-hostsβ invalidate SSH public keys of all hosts. This option overrides invalidation of SSH public keys of specific host if it was also set. you know the drill by now.-r,--sudo-rulerule β invalidate a particular sudo rule.-R,--sudo-rulesβ invalidate all cached sudo rules. This option overrides invalidation of specific sudo rule if it was also set. π-d,--domaindomain β restrict the invalidation process only to a particular domain. the "stay in your lane" flag. π-?,--helpβ display help message and exit. this is the help one, bestie.-?. remember it. β¨
π EFFECTS ON THE FAST MEMORY CACHE π
okay this section is the whole lore drop so lean in. π
sss_cache also invalidates the memory cache. and here's the thing β since the memory cache is a file which is mapped into the memory of each process which called SSSD to resolve users or groups, the file cannot be truncated. like, physically can't. rude of it, honestly.
so instead: a special flag is set in the header of the file to indicate that the content is invalid, and then the file is unlinked by SSSD's NSS responder and a new cache file is created. whenever a process is now doing a new lookup for a user or a group it will see the flag, close the old memory cache file and map the new one into its memory. and when all processes which had opened the old memory cache file have closed it while looking up a user or a group, the kernel can release the occupied disk space and the old memory cache file is finally removed completely. full circle. closure. growth. π¦
π the long-running-process situation
a special case is long running processes which are doing user or group lookups only at startup β e.g. to determine the name of the user the process is running as. for those lookups the memory cache file is mapped into the memory of the process. but since there will be no further lookups, this process would never detect if the memory cache file was invalidated. and hence it will be kept in memory and will occupy disk space until the process stops. π
as a result, calling sss_cache might increase the disk usage, because old memory cache files cannot be removed from the disk because they are still mapped by long running processes. yes. the cleanup tool can make the disk usage go up. i'm not joking. this is real. π
a possible work-around for long running processes which are looking up users and groups only at startup or very rarely is to run them with the environment variableSSS_NSS_USE_MEMCACHEset to"NO"so that they won't use the memory cache at all and not map the memory cache file into the memory.
but honestly? in general a better solution is to tune the cache timeout parameters so that they meet the local expectations and calling sss_cache is not needed. tune the timeouts, live your life, stop manually invalidating. that's the actual advice. πΈ
β SEE ALSO β
your reading list, go off:
sssd(8), sssd.conf(5), sssd-ldap(5), sssd-ldap-attributes(5), sssd-krb5(5), sssd-simple(5), sssd-ipa(5), sssd-ad(5), sssd-idp(5), sssd-sudo(5), sssd-session-recording(5), sss_cache(8), sss_debuglevel(8), sss_obfuscate(8), sss_seed(8), sssd_krb5_locator_plugin(8), sss_ssh_authorizedkeys(1), sss_ssh_knownhosts(1), sssd-ifp(5), pam_sss(8). sss_rpcidmapd(5) sssd-systemtap(5)
(yes, sss_cache(8) links to itself. she's self-referential. she contains multitudes. π)
π AUTHORS π
The SSSD upstream β https://github.com/SSSD/sssd/. give them their flowers. π·
and that's the page, bestie!! π this all came from SSSD, dated 10/06/2026 β go read the source, subscribe to the repo, stan the upstream. mwah. πβ¨
π¦ where this page comes from
- ubuntu stonking: sssd-tools 2.12.0-4ubuntu4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms