Closed IgorYbema closed 6 years ago
I like this, but from a security standpoint we might want to make this an option, or generate a random password. The default installed busybox has no passwd command so changing the password again is a bit difficult. Do you have any idea if we could DES-encrypt a password in Python or Bash?
Let me look into that. Should not be that hard. BTW, the default busybox from firmware 4.9.x and further doesn't contain the 'passwd' command anymore to change the password from command line.
This works:
PASS=`openssl passwd -crypt test 2>/dev/null` ; echo $PASS
I hope you like this commit better :-)
Yes. Tested that first few lines of the patch script on my development toon. It changed the password correctly.
This DES encrypted root password is 'password' so in the event of problems with SSH keys the user can fallback to using this password.