Question :
I need to generate a random password for a new online account for an app, but for some reason, macOS doesn’t suggest a Strong Password as usual…
How can I easily generate a random strong password ?
Answer :
When using Safari on macOS, Safari will automatically suggest a Safari Strong Password (and backs it up to iCloud) whenever a field where you need to manually type a new password…
However : this feature is Safari-only (as the name Safari Strong Password suggests), so if you need to manually type a new password into an app (or anything outside of Safari) this automatic suggestion won’t kick into play…
Luckily, macOS has a Password Generator built-in… only tricky thing is it’s a little hard to access… there are 2 ways to get the Password Generator to start up (and an alternative in case you need extra features) :
– Option 1 –
- Apple Menu > System Prefs > Users & Groups > Change Password > Key Icon
- now Password Assistant opens in a separate window
- Close previous window (that is now in the background) by clicking Cancel-button
- Back to Password Generator window
- set type of password you need
- Generate password
- Copy password
- Close Password Generator window
– Option 2 –
- User’s Home Folder > Applications > Utilities > KeychainAccess.app
- now the Keychain window opens
- click on the Plus-sign button ( or press the CMD + N key combo on your keyboard )
- now a pulldown window opens
- at “Password”, on the right, click the ‘black key’-button
- now Password Assistant opens in a separate window
- note : leave the Keychain Access window in the background, as trying to close it will also close the Password Assistant window
- in the Password Assistant window, set the type of password you need
- then, generate the new password
- copy the password
- switch to the window where you need to paste the new password
- then, switch back to the Keychain Access window and close it
– Alternative option –
If macOS’ built-in Password Generator doesn’t allow you to get a random password that suits your needs, for example if you need a memorable password, you can get the StrongPassword.app for FREE from the Mac AppStore.
StrongPassword.app has 3 main options of automatic password generation :
- “Basic”
- “Advanced”
- “Words”
- note : all 3 come with the option of adding or omitting symbols like ! ? @ & * _ + =
- The “Words” option comes closest to the (now obsolete) “Memorable” option that used to be built-in in macOSX and OSX
that’s it !
enjoy 😉
A trivial way to generate random passwords on MacOS is to open a terminal window and type in the following command
head -c 256 /dev/random | openssl sha512 -binary | base64 | tr -dc A-Za-z0-9 | cut -b1-n
replace the final “n” in the line with the desired length of the password, eg. cut -b1-14 for a 14 character password. This command works equally well on any Linux based system. It works reliably for generating passwords of up to 75 characters. Theoretical max is 86 but the “tr” command strips the symbols “+”, “/”, and “=” which reduces the total output somewhat.
@Thomas Stone :
Thanks for your tip !
It’s great how many features are available to us when using the Terminal.app but for the mainstream Mac-user one of the greatest pleasures of using a Mac is that there’s no need to mess around (and even risk messing up) with a command prompt…
that’s why the original post only lists some simple WYSIWYG-options to generate new passwords…
😉
enjoy !