I have a custom NSS module that I wrote and I typically install it by copying the library like so...

cp libnss_mymodule.so.0 /lib64/

... then I add my module to the /etc/nsswitch.conf ...

$ grep mymodule /etc/nsswitch.conf
passwd: mymodule files usrfiles sss systemd
group: mymodule files usrfiles sss systemd

This works for me in CentOS 7, but it doesn't work in CoreOS because /lib64 is on a read-only filesystem. Where can I put the shared object library on CoreOS that will be visible to nsdispath() ?

EDIT: I tried adding the file to /opt/me/lib64 and putting that in the LD_LIBRARY_PATH environment variable. It didn't seem to help.

2 Answers 2


Build a new image containing your changes with the developer SDK.

CoreOS calls itself immutable; this is by design.

  • I know this. I still need my NSS module to work.
    – Ishpeck
    Apr 12, 2019 at 17:40
  • 1
    @Ishpeck OK, so go on and do it. Apr 12, 2019 at 19:00

I got it to work by putting the libraries /opt/mything/lib64 and then modifying the following system configurations:

Added the following line to /etc/environment:


Added the following line to /etc/systemd/system.conf:


Then ran the following command:

sudo systemctl daemon-reload

This made it possible for NSS to find the custom NSS modules I built.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .