Musl's nsswitch Limitation while integrating tacacs

I am integrating TACACS in OpenWRT and have encountered a limitation with nsswitch as musl doesn't support it. When a user isn't listed in /etc/passwd , there's no UID and GID available, causing PAM to fail authentication despite successful authentication by the TACACS server. Integrating nsswitch could resolve this, but musl doesn’t support it and has no plans to in the future. Additionally, replacing musl with uClibc is not an option as uClibc is no longer supported by OpenWRT. Is there any alternative solution or workaround to overcome this issue?

Can't you just reconfigure PAM to take other sources into consideration?

The musl C library itself has some builtin capabilities to query group and user information via the NSCD protocol, so you could port and deploy to provide a subset of the /etc/nsswitch.conf functionality under musl.

You provided so little context that it is impossible to provide any further guidance. For example why it is not possible to simply amend /etc/passwd or how the UID/GID lookup is performed specifically by "TACACS".