-
Notifications
You must be signed in to change notification settings - Fork 254
chpasswd: Check hash before write when using -e #1285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
183a7aa to
6e12d17
Compare
180f236 to
d9eff0e
Compare
|
@alejandro-colomar Everything should be resolved. |
alejandro-colomar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the minor style comments, I like this very much! Thanks!
Reviewed-by: Alejandro Colomar <alx@kernel.org>
7837faf to
7f9c2ad
Compare
|
All's good. Please squash the commits into one, and I'll merge. Thanks! |
|
Please fix the commit message. It is currently: :) |
Please include this in the commit message, with the code examples indented with a tab. |
This (from the commit message) doesn't match the code from the patch. The parentheses around the line number are not there. |
Add is_valid_hash to prevent adding a bad hash in /etc/shadow (and so prevent user to be lock) when using chpasswd -e
# before
echo 'vinz:test123' | chpasswd -e
grep vinz /etc/shadow
vinz:test123:20280:0:99999:7:::
# now
echo 'vinz:test123' | sudo ./chpasswd -e
chpasswd: (line 1, user vinz) invalid password hash
chpasswd: error detected, changes ignored
alejandro-colomar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
|
@alejandro-colomar i changed commit msg and error msg (used do_pam_passwd_non_interactive style) and changed "config.h" import |
Add is_valid_hash to prevent adding a bad hash in /etc/shadow (and so prevent user to be lock) when using chpasswd -e