libpam: Add a patch to allow null passwords - #1068
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces an NI-specific linux-pam patch to allow setting an empty (blank) password via passwd/expired-password flows, and updates the Yocto recipe append to apply the patch and enable the necessary PAM option in the installed configuration.
Changes:
- Adds a linux-pam patch that keeps
"\0"passwords as empty strings (instead of converting them toNULL) and writes an empty shadow-field when a blank password is chosen. - Updates the libpam
.bbappendto apply the patch and injectnullokinto/etc/pam.d/common-passwordduring install.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| recipes-extended/pam/libpam/0001-pam_unix_passwd-allow-blank-passwords.patch | Adds linux-pam source/docs changes to permit blank passwords (when configured). |
| recipes-extended/pam/libpam_1.%.bbappend | Applies the patch and modifies PAM config to add nullok during image build. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
0dcd47c to
db5a520
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Suppressed comments (1)
recipes-extended/pam/libpam/0001-pam_unix_passwd-allow-blank-passwords.patch:30
- The updated pam_unix documentation no longer mentions that the behavior is controlled by the
nullokoption, and the new wording reads like the default action both denies blank passwords and allows setting them during password changes. This is misleading given the patch description (“toggled by the nullok option”).
The default action of this module is to not permit the
- user access to a service if their official password is blank.
- The <option>nullok</option> argument overrides this default.
+ user access to a service if their official password is blank
+ or allow blank passwords to be set during password changes.
</para>
|
Does (I just went down the same "passwd won't let me supply an empty string to |
This patch is intended to support the workflow of setting a blank password in the expired password prompt itself so that users can immediately set a blank password during set on first use. |
Add a patch to linux-pam that allows users to set a blank password when using the passwd command and when updating an expired password. This is done by not setting "\0" passwords to NULL and setting the password hash to be blank for "\0" passwords. The change is toggled using the existing nullok option for linux-pam. Signed-off-by: Erick Shepherd <erick.shepherd@ni.com>
db5a520 to
9681c16
Compare
Summary of Changes
Add a patch to linux-pam that allows users to set a blank password when using the passwd command and when updating an expired password. This is done by not setting "\0" passwords to NULL and setting the password hash to be blank for "\0" passwords.
AB#3962858
Justification
This change will help our internal teams and customers adapt to the Set on First Use strategy of shipping with expired passwords by allowing them to set the new password to be blank.
Testing
bitbake packagefeed-ni-core)Procedure