[Buildroot] [PATCHv2 proposal/next 2/3] build: replace host-mkpasswd with host-busybox
Yann E. MORIN
yann.morin.1998 at free.fr
Fri Jun 8 17:13:03 UTC 2018
Stefan, Arnout, All,
On 2018-06-08 14:40 +0300, Stefan Becker spake thusly:
> On Fri, Jun 8, 2018 at 12:29 AM Arnout Vandecappelle <arnout at mind.be> wrote:
> > So, not whois, not busybox, not openssl... What about python, which we anyway
> > require to be installed on the host? I remember that someone has posted a
> > one-liner that would do the job :-P
Well, I'd still prefer we had a script, and especially I did not like
that it would read the random bytes from stdin, when python provides a
proper random abstraction:
import os
os.urandom(64) # 64 random bytes
This is even portable, using various backends on various OSes... Then
your previous proposal becomes acceptable. Now. ;-)
> Because a python one-liner is not enough. F.ex. from support/scripts/mkuser:
>
> # Encode a password
> encode_password() {
> local passwd="${1}"
>
> mkpasswd -m "${PASSWD_METHOD}" "${passwd}"
> }
Well, that one is an internal script of oours (I wrote it), so we can
very well change it to use another tool without problem.
> i.e. you need at least a python script with mkpasswd-compatible
> command line parameters.
Ideally, a mkpasswd-compatible tool would be nice, but as long as we use
it internally, we don't care much, in fact.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
More information about the buildroot
mailing list