Add libnss_pwb NSS support to workbench-session (jammy + noble)#132
Merged
Conversation
Create a build-time dangling symlink from the glibc NSS multiarch path to
/usr/lib/rstudio-server/bin/{jammy,noble}/libnss_pwb.so and append pwb
after files in nsswitch.conf for passwd, group, and shadow. Dormant-safe:
with no workbench-nss.conf present the module returns UNAVAIL and
resolution falls through to files — non-rootless containers are unaffected.
Companion to rstudio/rstudio-docker-products#1053.
bschwedler
requested changes
Jun 11, 2026
bschwedler
left a comment
Contributor
There was a problem hiding this comment.
Looking good.
Please add some goss tests for this. Thanks!
Verifies the nsswitch.conf entries for passwd/group/shadow include the pwb module, and that the architecture-specific dangling symlink for libnss_pwb.so.2 was created at image build time.
bschwedler
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/usr/lib/rstudio-server/bin/{jammy,noble}/libnss_pwb.so— the location populated at runtime byworkbench-session-initpwbafterfilesinnsswitch.confforpasswd,group, andshadowso rootless session users resolve via the Workbench API instead of failing a/etc/passwdlookupamd64(x86_64-linux-gnu) andarm64(aarch64-linux-gnu) viaTARGETARCHDormant-safe: with no
workbench-nss.confpresent (orWORKBENCH_NSS_CONFIG_PATHunset), the module returnsUNAVAILand resolution falls through tofiles— non-rootless containers are unaffected.Companion to rstudio/rstudio-docker-products#1053, extending the same pattern to both ubuntu2204 (jammy) and ubuntu2404 (noble).
Test plan
bakery build --image-name workbench-sessionls -la /usr/lib/x86_64-linux-gnu/libnss_pwb.so.2→../rstudio-server/bin/jammy/libnss_pwb.sols -la /usr/lib/x86_64-linux-gnu/libnss_pwb.so.2→../rstudio-server/bin/noble/libnss_pwb.sogrep -E '^(passwd|group|shadow)' /etc/nsswitch.confshowsfiles pwbgetent passwd rootresolves without errorgetent passwd <rootless-session-user>resolves via pwb