1

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.

Ishpeck
  • 204
  • 1
  • 6

2 Answers2

0

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

CoreOS calls itself immutable; this is by design.

John Mahowald
  • 30,009
  • 1
  • 17
  • 32
0

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:

LD_LIBRARY_PATH=/opt/mything/lib64

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

DefaultEnvironment=LD_LIBRARY_PATH=/opt/mything/lib64

Then ran the following command:

sudo systemctl daemon-reload

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

Ishpeck
  • 204
  • 1
  • 6