LINUX LITE 7.2 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Random Passwords Anyone ?
#1
Hello,

here is a function for making random passwords. It works for the session you are in, and will need re-adding in a new session, eg you can close and open terminal and randpw will work but if you reboot you need to re-add the function.

Code:
randpw(){ < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-16};echo;}

If you copy/paste this (or type it) into your terminal and hit enter.

Every time you need a new random password open your terminal and type

Code:
randpw

and it will generate one and save you having to type the entire function out again that session.

An example -

[Image: pw.png]

Be sure to save any random passwords you use somewhere safe, like the password locker/safe, didn't we used to have one of these in Linux Lite ?

I will post some other ways to do this soon.
Reply
#2
Another way to do this but without saving it as a function, eg; you will need to type it in each time.

Is to type into your terminal

Code:
< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;

An example

[Image: screen2.png]

Coz reverse stuff can be fun, lets do it in reverse -

Code:
tr -cd '[:alnum:]' < /dev/urandom | fold -w30 | head -n1

An example

[Image: screen3.png]

More to come
Reply
#3
We may want to add the randomness to our username -

Code:
< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c6

Copy/paste (or type it in to your terminal) hit enter -

An example

[Image: screen4.png]
Reply
#4
Just need it quick -

Code:
date | md5sum

An example

[Image: screen5.png]
Reply
#5
Another simple way to make a password is to type in to your terminal the command -

Code:
rev

Now type in some text and hit enter, this will reverse the text, it may give some ideas for passwords.

To exit the command hold down Ctrl Key and press Z key to return to your prompt.

Hope they were fun, interesting and of use for someone. Smile
Reply
#6
You know, I am beginning to love the terminal...!  Big Grin
Don't worry about artificial intelligence.  Worry about natural stupidity.  Smile
Reply
#7
(02-01-2018, 12:45 PM)ian_r_h link Wrote: You know, I am beginning to love the terminal...!  Big Grin
Smile

I'll add a couple more, and then some other fun ones in another thread soon.
Reply
#8
Hold down Ctrl and Alt keys and press t (Ctrl Alt + t)
Copy/paste (or type) in to your terminal -

Code:
openssl rand -base64 32

An example

[Image: openssl.png]
Reply
#9
Hold down Ctrl and Alt keys and press t (Ctrl Alt + t)
Copy/paste (or type) in to your terminal -

Code:
date +%s | sha256sum | base64 | head -c 32 ; echo

An example

[Image: sha256.png]
Reply
#10
To answer the question I missed that you posed, KeypassX is available in the Lite Software list I believe - I use that myself as a password store.

My plan for this year is to continue working through the Linux Bible, and then move onto learning the depths of the terminal from Beginning the Linux Command Line.  (Both references below, should anyone want to explore the two books.)

Thanks to everyone here for LL - I've fallen in love with computing again.  Assuming use of the term "computing" doesn't betray my age!  Trying to convince friends and family to give LL a go, now that they are finding Windows 10 hard-going!  ;D

Negus, Christopher.  2015.  Linux Bible (9th Ed.)  Wiley.  ISBN 978-1-118-99987-5.
Van Vugt, Sander.  2009.  Beginning the Linux Command Line.  Apress.  ISBN 978-1-4302-1889-0.
(New versions of each may be available.)
Don't worry about artificial intelligence.  Worry about natural stupidity.  Smile
Reply


Forum Jump:


Users browsing this thread: 8 Guest(s)