Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • About Bonfire
Dr. Juande Santander-Vela
Dr. Juande Santander-Vela
@juandesant@mathstodon.xyz  ·  activity timestamp last week

PSA: How to create a random password in the command line (something that also just learned to do today, so also a TIL entry):

```bash
randpass () { echo $(openssl rand -base64 "${1:-12}") }
```

The way this works is that you can type either `randpass`, and you will get a random password of 12 character (among those that are safe in the base64 representation; namely, lowercase and capital letters, decimal digits, plus `+` and `/`, and `= ` for padding).

Or, you can type `randpass 8` or `randpass 256`, for instance, to get a random password of the given characters long, to accommodate the needs from the service you need the password for.

On the Mac, you can do `randpass | pbcopy` and get it directly on your clipboard, so that you can paste it elsewhere, while keeping it hidden.

#PSA #PublicServiceAnnouncement #TIL #TodayILearned #CLI #CommandLineInterface #openssl #pbcopy #bash #zsh

  • Copy link
  • Flag this post
  • Block
Colin Sampler
Colin Sampler
@colinsampler@me.dm  ·  activity timestamp 5 days ago

I wrote something for this on my own about month ago https://medium.com/@colin.sampler/my-own-bash-passwords-manager-e3b6d0f42d67

  • Copy link
  • Flag this comment
  • Block
Kurt Roeckx
Kurt Roeckx
@kroeckx@techhub.social  ·  activity timestamp last week

@juandesant or you could just use pwgen

  • Copy link
  • Flag this comment
  • Block

BT Free Social

BT Free is a non-profit organization founded by @ozoned@btfree.social . It's goal is for digital privacy rights, advocacy and consulting. This goal will be attained by hosting open platforms to allow others to seamlessly join the Fediverse on moderated instances or by helping others join the Fediverse.

BT Free Social: About · Code of conduct · Privacy ·
Bonfire social · 1.0.2-alpha.34 no JS en
Automatic federation enabled
Log in
Instance logo
  • Explore
  • About
  • Code of Conduct