Small script to generate a random password. Works on Linux with busybox, haven't tested on GNU.

hexdump -e '"%02x""\n"' /dev/random | tr -d '\n' | dd count=32 bs=1 2>/dev/null; echo

#unix #commandline #utilities

Follow

@yyp

</dev/urandom tr -dc '[:alnum:]' | head -c 32 ; echo

And a stronger version,

</dev/urandom tr -dc '[:alnum:][:punct:]' | head -c $(( $RANDOM % 32 + 32 )) ; echo

git.zx2c4.com/password-store/t

@yyp
For completeness' sake, here's a pretty picture [command line password generator (for the search engines)].

And I definitely recommend pass(1).

passwordstore.org/

@torresjrjr I've been using pass until recently. It strictly depends on coreutils, and I'm on Alpine Linux, which kind of defeats the point of Alpine. And there's not that much to gain for me when using pass anyway, since it's just GPG encrypted files and I already know how to manage such :)

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.