[systemd-devel] nss-systemd
Gildas Bayard
gildas.bayard at hds.utc.fr
Tue Apr 5 09:24:23 UTC 2022
Indeed my systemd is version 245.4-4ubuntu3.15...
How could I know that the minimal required version was 249 (so I don't
bother you again!)?
Le 05/04/2022 à 11:21, Lennart Poettering a écrit :
> On Di, 05.04.22 10:30, Gildas Bayard (gildas.bayard at hds.utc.fr) 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
--
*Gildas Bayard*
Ingénieur de Recherche
Responsable Sécurité des Systèmes d'Informations
Coordonnateur pour la Protection du Potentiel Scientifique et Technique
/Télétravail le mercredi/
Laboratoire HEUDIASYC - UMR CNRS 7253 - GI028
UTC Centre de Recherches de Royallieu
BP 20529 - 60205 Compiègne Cedex
Tél. 03 44 23 46 71
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20220405/25d84f7d/attachment.htm>
More information about the systemd-devel
mailing list