Seems like the password generation was broken, not the actual writing to the file. Changed the pwgen binary with native python libraries to generate the password. Proposed fix.
Seems like the password generation was broken, not the actual writing to the file. Changed the pwgen binary with native python libraries to generate the password. Proposed fix.