More Examples (Password Generation): Use POSIX tools instead of pwgen
This better melds with the spirit of the talk since it shows users how to repurpose existing tools rather than use a specialized one.master
parent
0f9b1ddf16
commit
cc7dc5d288
|
@ -2734,8 +2734,8 @@ Both examples produce a new set of images prefixed with =sm-=.
|
|||
|
||||
#+BEGIN_SRC
|
||||
# generate a random 32-character password
|
||||
$ pwgen -ysn1 32
|
||||
!Wd\%Hhg5j-{c2GY(p1Y}TkQJM#{1LUA
|
||||
$ tr -cd '[:graph:]' < /dev/urandom | head -c32
|
||||
`TB~cmJQ1%S8&tJ,%FoD54}"Fm4}\Iwi
|
||||
|
||||
# generate passphrase from EFF's large dice wordlist
|
||||
# (https://www.eff.org/dice)
|
||||
|
@ -2753,8 +2753,9 @@ oppressor roman jigsaw unhappy thinning grievance
|
|||
:END:
|
||||
|
||||
How about password generation?
|
||||
=pwgen= is a tool that can generate passwords of various forms.
|
||||
Here we generate a random 32-character password.
|
||||
=/dev/urandom= consists of random binary data.
|
||||
We can use =tr= to delete everything that is not a printable character by
|
||||
taking the complement of =graph=.
|
||||
That type of password is useful if you have a password manager,
|
||||
but it's not useful if you need to memorize it.
|
||||
|
||||
|
|
Loading…
Reference in New Issue