6 ms·
> I use https://lastpass.com/ https://lastpass.com/ for generating passwords. ... Would prefer open source, but nothing else comes close. On a linux/unix syste
by 0xmohit 10y ago
> I use https://lastpass.com/ https://lastpass.com/ for generating passwords. ... Would prefer open source, but nothing else comes close.
On a linux/unix system, one could use /dev/urandom:
tr -dc '[[:alnum:][:punct:]]' < /dev/urandom | head -16c
would generate a 16 character long password.
One could even put the following function in $HOME/.bash_profile or such
genpw() {
tr -dc '[[:alnum:][:punct:]]' < /dev/urandom | head -${1-16}c
}
Now invoking it by saying genpw would generate a pseudorandom string of 16 characters length. You could specify the length by passing a parameter to it, e.g. genpw 8.
- EasyTiger_ 10y agoAre you implying this comes close to the convenience of LastPass?
- 0xmohit 10y agoSorry, haven't used LastPass myself. But as far as generating a random password goes, this would be pretty effective.
- deleted 10y ago[deleted]
- jrnichols 10y agoUbuntu has "apg" which I think does something similar. https://help.ubuntu.com/community/StrongPasswords https://help.ubuntu.com/community/StrongPasswords
- edent 10y agoO...K... but where do you store them? How do you sync them between devices? How do you auto fill them in the browser? How do you change them when a service is compromised? How do you securely share them with other users? LastPass does all of that. And I don't even have to drop into the terminal.
- kbaker 10y agopwgen already exists, working exactly like you were thinking. $ pwgen 16 1 siaJa9fohnie9aew Though, you should use lastpass or similar for many other reasons. Not just generating passwords, but for managing them.