Fixing RADIUS invalid shell#22933
Merged
yxieca merged 2 commits intosonic-net:masterfrom Jun 12, 2025
Merged
Conversation
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
@qiluo-msft @yxieca Here is the follow-up to #13141 and the removal of the docker group for the read-only user. Can you please review it? |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue with the RADIUS user authentication by correcting the shell used for RADIUS users. Key changes include:
- Removing the docker group assignment for the primary remote user.
- Changing the shell for both the primary and secondary RADIUS user entries from "/usr/bin/sonic-launch-shell" to "/bin/bash".
Comments suppressed due to low confidence (3)
src/radius/nss/libnss-radius/nss_radius_common.c:160
- Confirm that removing the docker group from rnm[0] while retaining it in rnm[RADIUS_MAX_MPL-1] is intentional to ensure consistent group permissions across RADIUS user definitions.
rnm[0].groups = "docker"
src/radius/nss/libnss-radius/nss_radius_common.c:162
- Verify that switching the shell to /bin/bash meets the RADIUS authentication requirements and is available in all intended deployment environments.
rnm[0].shell = "/bin/bash"
src/radius/nss/libnss-radius/nss_radius_common.c:166
- Ensure that using /bin/bash as the shell for the secondary RADIUS user maintains compatibility with any scripts or commands expecting the previous shell configuration.
rnm[RADIUS_MAX_MPL-1].shell = "/bin/bash"
qiluo-msft
approved these changes
Jun 11, 2025
DavidZagury
approved these changes
Jun 12, 2025
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.
Why I did it
This is a follow up to #13141, to include reomving the docker group add for the RO user for RADIUS. The sudoer file already allows
docker pscommandWork item tracking
How I did it
How to verify it
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
This fix was tested on master branch and 202411 runing the sonic-mgmt RADIUS test suite.
Description for the changelog
Fixed RADIUS user authentication issue due to invalid shell (sonic-launch-shell)
Resolves
This pull request resolves PR#11352 (#11352) under sonic-buildimage repository.