Merge ~tore.lonoy/cloud-init:hashed-chpasswd-support into cloud-init:master
Status: | Merged |
---|---|
Merged at revision: | 21632972df034c200578e1fbc121a07f20bb8774 |
Proposed branch: | ~tore.lonoy/cloud-init:hashed-chpasswd-support |
Merge into: | cloud-init:master |
Diff against target: |
112 lines (+44/-12) 2 files modified
cloudinit/config/cc_set_passwords.py (+36/-11) doc/examples/cloud-config.txt (+8/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Needs Fixing | |
Scott Moser | Needs Fixing | ||
Review via email: mp+310051@code.launchpad.net |
Commit message
Add support for setting hashed passwords
This change will add support for hashed passwords in cc_set_passwords.
It checks if a password is a hash with this if/regxp statement:
re.match(
chpasswd needs to know if the password is hashed or not, so two lists
is created so chpasswd is feed with the correct one.
Description of the change
Currently only static or randomly generated passwords are supported,
adding support for hashed passwords enables the user to store password
in they configuration a little more secure then using plain-text.
I have been unable to run all the tests on the change, but I've verified
that it works by running these test manually:
* setting static password
* setting static and random
* setting hashed password
* setting hashed and static password
This is my first commit to any open-source project.
this looks good. I marked 'Needs Fixing', just for a few nit picks.
I'd like some sort of unit test too.
The trend for adding unit tests is really to make 'handle' do less and move things into methods and use those methods.