Yes. I'm sorry about the back and forth. I didn't understand the difference between chpasswd and passwd , the former operating on a list of passwords vs a single password. Thank for sticking with this work.
With that in mind; I worry about churn here; and I also don't like converting what was a single subprocess call to chpasswd to multiple calls to passwd. Obviously in the case where chpasswd is not available, we must use multiple calls to passwd.
So yes, I think something closer to your version 1, but I think we can abstract it in cc_set_password itself.
Gonéri ,
Yes. I'm sorry about the back and forth. I didn't understand the difference between chpasswd and passwd , the former operating on a list of passwords vs a single password. Thank for sticking with this work.
With that in mind; I worry about churn here; and I also don't like converting what was a single subprocess call to chpasswd to multiple calls to passwd. Obviously in the case where chpasswd is not available, we must use multiple calls to passwd.
So yes, I think something closer to your version 1, but I think we can abstract it in cc_set_password itself.
Something like this:
http:// paste.ubuntu. com/p/xh5DmKvWy 5/