On Di, 05.04.22 10:30, Gildas Bayard (gildas.bayard@xxxxxxxxxx) wrote: > Hello, > > I'd like to dynamically provide group data when group data is queried by the > system (as in "getent group"). > > Since nsswitch can use systemd, I've looked at nss-systemd. > > As a first step I tried to define a Static Drop-In JSON User Record (because > user definition is documented with more details than group definition). > > So I added a toto.user in /etc/userdb/ with this > > { > "userName" : "toto", > "uid" : 7777 > } > and a 7777.user file pointing to toto.user > > But when I run "getent passwd", there's no toto user. > > I tried to see a bit what's going on with strace and I see that getent opens > libnss_systemd.so.2 and looks for files in /run/systemd/userdb. > > But it's not even trying to read in the directories |etc/userdb/|, > |/run/userdb/|, |/run/host/userdb/| and |/usr/lib/userdb/| > > || > > Any suggestion? Maybe your systemd version is simply too old? You need v249 at the least for the above. Lennart -- Lennart Poettering, Berlin