Back to <til> Today I learned

How to Generate a Secure Password From Command Line

When installing a new server or just creating an online account is common to need a secure password. You can use a password generator to create a secure password, but you can also use the command line to generate a secure password.

openssl rand -base64 32 | pbcopy

This command will generate a secure password and copy it to your clipboard. You can also use the tr command to remove the new line character.

openssl rand -base64 32 | tr -d '\n' | pbcopy

In case you want to save it to a file, you can use the tee command.

openssl rand -base64 32 | tr -d '\n' | tee -a ~/password.txt

All the commands above will generate a 32 character password. You can change the number to generate a different length password. Also I’m using -base64 to generate a password with letters, numbers and special characters (plus and equal sign). You can use -hex to generate a password with only letters and numbers.

Back to <til> Today I learned

Posts by me

Kernel mods with eBFP

Friday, July 19 2024 was a very interesting day, several Windows machines were down showing the blue screen of death. The problem was caused by a software update from a security company named Crowdstrike, which was installed on all the …

Popular git config options

Yeah, another hightlight from HN. This time Julia Evans (I have her in my syndication list, but saw her post from HN), shared a very interesting list of pupular git config options, source

Recurrency notation RFC-5545

I learn about the https://datatracker.ietf.org/doc/html/rfc5545 From the specification: This document defines the iCalendar data format for representing and exchanging calendaring and scheduling information such as events, to-dos, journal …