NAS-135898 / 25.10 / Add special case handling of user password disable. #16508
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.
When user passwords are disabled the user can no longer manage password change requirements or any password policy restrictions. Under certain configurations, e.g. STIG, this can lead to the user account being disabled. We want to avoid this condition.
The fix for this is to special case the user shadow entry to disable all expiration type settings when the user has password authentication disabled.
The shadow entry for a password disabled user will be
*:::::::
. This will prevent the user getting disabled due to password requirements.Also added a CI unit test.
Also fixed a small error in the unit test. Reporting info on an assert was missing some data.
This fixes the issue raised in NAS-135863