You are Here:
Linux Lite 4.0 Final has been released. See the Release Announcements Section.




[ HELPFUL TIP ] Random Passwords Anyone ?

Author (Read 2048 times)

0 Members and 1 Guest are viewing this topic.

Random Passwords Anyone ?
« on: January 31, 2018, 01:52:04 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 2513
    Posts
  • Country: ie
  • Reputation: 264

  • Linux Lite: 3.2 64bit
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: [Select]
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: [Select]
randpw
and it will generate one and save you having to type the entire function out again that session.

An example -



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.
Last Edit: January 31, 2018, 02:29:37 PM by bitsnpcs
I use no computer in work, I am just a home user, at beginner/learning Linux stage.
Trying to join in with community and assist where it may be possible :)
 


Re: Random Passwords Anyone ?
« Reply #1 on: January 31, 2018, 01:59:55 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 2513
    Posts
  • Country: ie
  • Reputation: 264

  • Linux Lite: 3.2 64bit
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: [Select]
< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;
An example



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

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



More to come
I use no computer in work, I am just a home user, at beginner/learning Linux stage.
Trying to join in with community and assist where it may be possible :)
 

Re: Random Passwords Anyone ?
« Reply #2 on: January 31, 2018, 02:04:37 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 2513
    Posts
  • Country: ie
  • Reputation: 264

  • Linux Lite: 3.2 64bit
We may want to add the randomness to our username -

Code: [Select]
< /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

I use no computer in work, I am just a home user, at beginner/learning Linux stage.
Trying to join in with community and assist where it may be possible :)
 

Re: Random Passwords Anyone ?
« Reply #3 on: January 31, 2018, 02:08:28 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 2513
    Posts
  • Country: ie
  • Reputation: 264

  • Linux Lite: 3.2 64bit
Just need it quick -

Code: [Select]
date | md5sum
An example

I use no computer in work, I am just a home user, at beginner/learning Linux stage.
Trying to join in with community and assist where it may be possible :)
 

Re: Random Passwords Anyone ?
« Reply #4 on: January 31, 2018, 02:27:51 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 2513
    Posts
  • Country: ie
  • Reputation: 264

  • Linux Lite: 3.2 64bit
Another simple way to make a password is to type in to your terminal the command -

Code: [Select]
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. :)
Last Edit: January 31, 2018, 03:33:00 PM by bitsnpcs
I use no computer in work, I am just a home user, at beginner/learning Linux stage.
Trying to join in with community and assist where it may be possible :)
 

Re: Random Passwords Anyone ?
« Reply #5 on: February 01, 2018, 07:45:41 AM »
 

ian_r_h

  • Merchandise Supporter
  • Occasional Poster
  • *****
  • 87
    Posts
  • Country: gb
  • Reputation: 10
  • Linux Lite Member

  • Linux Lite: 3.6 64bit
You know, I am beginning to love the terminal...!  :D
Don't worry about artificial intelligence.  Worry about natural stupidity.  :)
 

Re: Random Passwords Anyone ?
« Reply #6 on: February 01, 2018, 12:43:54 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 2513
    Posts
  • Country: ie
  • Reputation: 264

  • Linux Lite: 3.2 64bit
You know, I am beginning to love the terminal...!  :D
:)

I'll add a couple more, and then some other fun ones in another thread soon.
Last Edit: February 01, 2018, 03:07:02 PM by bitsnpcs
I use no computer in work, I am just a home user, at beginner/learning Linux stage.
Trying to join in with community and assist where it may be possible :)
 

Re: Random Passwords Anyone ?
« Reply #7 on: February 01, 2018, 02:52:35 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 2513
    Posts
  • Country: ie
  • Reputation: 264

  • Linux Lite: 3.2 64bit
Hold down Ctrl and Alt keys and press t (Ctrl Alt + t)
Copy/paste (or type) in to your terminal -

Code: [Select]
openssl rand -base64 32
An example

Last Edit: February 01, 2018, 03:06:23 PM by bitsnpcs
I use no computer in work, I am just a home user, at beginner/learning Linux stage.
Trying to join in with community and assist where it may be possible :)
 

Re: Random Passwords Anyone ?
« Reply #8 on: February 01, 2018, 02:58:23 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 2513
    Posts
  • Country: ie
  • Reputation: 264

  • Linux Lite: 3.2 64bit
Hold down Ctrl and Alt keys and press t (Ctrl Alt + t)
Copy/paste (or type) in to your terminal -

Code: [Select]
date +%s | sha256sum | base64 | head -c 32 ; echo
An example

Last Edit: February 01, 2018, 03:00:48 PM by bitsnpcs
I use no computer in work, I am just a home user, at beginner/learning Linux stage.
Trying to join in with community and assist where it may be possible :)
 

Re: Random Passwords Anyone ?
« Reply #9 on: February 02, 2018, 07:22:41 AM »
 

ian_r_h

  • Merchandise Supporter
  • Occasional Poster
  • *****
  • 87
    Posts
  • Country: gb
  • Reputation: 10
  • Linux Lite Member

  • Linux Lite: 3.6 64bit
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.  :)
 

Re: Random Passwords Anyone ?
« Reply #10 on: February 02, 2018, 08:46:20 AM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 2513
    Posts
  • Country: ie
  • Reputation: 264

  • Linux Lite: 3.2 64bit
Hello @ian_r_h ,

thank you for the answer about KeypassX  :)

Are you using the Linux Bible with RHEL, Fedora, or Ubuntu Gnome, as its wrote for these, or another distro ?
I didn't get far with it, Chapter 2 Gnome Extensions, it kept asking for the root password and wouldn't accept it, unsure what mistake I made, so I have removed it from VirtualBox and have not gotten around to putting it back to try again yet.

Update -
I have reinstalled Fedora27 workstation, in VirtualBox on Linux Lite this morning, and have found where I went wrong on the install.
So have managed to get the browser and install working on Fedora and the Gnome extensions is working, and I've added some menus, top and bottom panel, and changed the workspace switcher, as in the book.
Not in the book also done 1366 updates, including the kernel and headers.
The book sort of misses out all of this, and skips to using the Gnome extensions.

Cannot get the run script to work for the guest additions, as it says it needs to be installed in Fedora guest not on the host machine, so its next one to work on. This is also not covered in the book.
It means I have managed to get .......... 2 pages further in Chapter 2 of the book now :) , not much but I'm still happy for the movement, I am where it says to jump to Chapter 10 for installing some stuff. :o
(Maybe guest additions is covered there)

Update 2 -
have got the guest additions installed now. :)
done the clone, and some installs. Moving forward a tiny bit quicker now.
 
Last Edit: February 03, 2018, 02:28:15 PM by bitsnpcs
I use no computer in work, I am just a home user, at beginner/learning Linux stage.
Trying to join in with community and assist where it may be possible :)
 

Re: Random Passwords Anyone ?
« Reply #11 on: February 02, 2018, 03:42:17 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 2513
    Posts
  • Country: ie
  • Reputation: 264

  • Linux Lite: 3.2 64bit
Hold down Ctrl and Alt keys and press t (Ctrl Alt + t)
Copy/paste (or type) in to your terminal -

Code: [Select]
strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 30 | tr -d '\n'; echo
An example

I use no computer in work, I am just a home user, at beginner/learning Linux stage.
Trying to join in with community and assist where it may be possible :)
 

Re: Random Passwords Anyone ?
« Reply #12 on: February 02, 2018, 03:47:37 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 2513
    Posts
  • Country: ie
  • Reputation: 264

  • Linux Lite: 3.2 64bit
Hold down Ctrl and Alt keys and press t (Ctrl Alt + t)
Copy/paste (or type) in to your terminal -

Code: [Select]
dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev
An example

I use no computer in work, I am just a home user, at beginner/learning Linux stage.
Trying to join in with community and assist where it may be possible :)
 

Re: Random Passwords Anyone ?
« Reply #13 on: February 03, 2018, 07:21:47 AM »
 

ian_r_h

  • Merchandise Supporter
  • Occasional Poster
  • *****
  • 87
    Posts
  • Country: gb
  • Reputation: 10
  • Linux Lite Member

  • Linux Lite: 3.6 64bit
I'm just working through the book without working through the examples, at the moment.  That's kind of how I learn - an initial read and a break, so my mind consolidates things.

LL is my only distro at this time.  I guess I'm still at the "getting a feel for" stage with Linux.  But so far I really like Linux!

BTW, what's the @username thing in the forum??
Don't worry about artificial intelligence.  Worry about natural stupidity.  :)
 

Re: Random Passwords Anyone ?
« Reply #14 on: February 03, 2018, 10:03:08 AM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 2513
    Posts
  • Country: ie
  • Reputation: 264

  • Linux Lite: 3.2 64bit
Hello ian_r_h,

with learning it is always best to do what works well for you, being settled/comfortable seems to me to be  a very big part of learning :)

LL is the only distro I use every day, I no longer use Windows, which is just since January, but it was a big step to take for me, it has taken me 3 years to get to take that step lol.

The @username thing , if a member has email notifications set up in their profile, it sends them an email saying they were "mentioned in a post"
Also in your forum profile, you can click a menu on the left side, that is named "Mentions", to find any posts where you were mentioned this way.
It's useful because the forum is a very busy place.
I use no computer in work, I am just a home user, at beginner/learning Linux stage.
Trying to join in with community and assist where it may be possible :)
 


Tags:
 


Linux Lite 4.0 Final has been released. See the Release Announcements Section.