Comments on: How to Generate, Encrypt and Decrypt Random Passwords in Linux https://www.tecmint.com/generate-random-password-linux/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Thu, 13 Jul 2023 16:55:21 +0000 hourly 1 By: gregory https://www.tecmint.com/generate-random-password-linux/comment-page-1/#comment-881837 Fri, 07 Apr 2017 08:23:26 +0000 http://www.tecmint.com/?p=12218#comment-881837 Hello,

What about the command: “openssl rand”. Is it good enough to be a part of this article?

]]>
By: Ravi Saive https://www.tecmint.com/generate-random-password-linux/comment-page-1/#comment-690240 Tue, 20 Oct 2015 11:42:03 +0000 http://www.tecmint.com/?p=12218#comment-690240 In reply to Stef.

@Stef,
Thanks for the tips….:)

]]>
By: Stef https://www.tecmint.com/generate-random-password-linux/comment-page-1/#comment-690219 Tue, 20 Oct 2015 10:55:07 +0000 http://www.tecmint.com/?p=12218#comment-690219 In reply to Stef.

As a second though, applying base64 to the output of md5sum, so an hexadecimal number, is even worse because that seriously limits the possibilities.

Here a small bash command that shows the probability of finding a character at each rank 1-8. This is of course cyclic since base64 encodes 3 input bytes in 4 characters.

# for ((j=1;j<=8;j++)) ; do echo === $j ; for ((i=0;i<1000;i++)) ; do echo $RANDOM | md5sum | base64 | cut -c $j ; done | sort | uniq -c ; done

]]>
By: Stef https://www.tecmint.com/generate-random-password-linux/comment-page-1/#comment-690213 Tue, 20 Oct 2015 10:34:58 +0000 http://www.tecmint.com/?p=12218#comment-690213 In reply to Avishek Kumar.

Be aware that the value returned by $RANDOM is between 0 and 32767 so this method is not very secure. You should add a seed. Also, the output contains only 8 hexadecimal numbers and so should be easy to crack by brute force.

echo FooBar$RANDOM | md5sum | base64 | cut -c 1-8

Another alternative is to generate random bytes using /dev/urandom (or even better using /dev/random but that one can be very slow) and to convert them to characters using base64

cat /dev/urandom | base64 | head -n 1 | cut -c 1-8

]]>
By: Avishek Kumar https://www.tecmint.com/generate-random-password-linux/comment-page-1/#comment-599546 Mon, 15 Jun 2015 10:08:31 +0000 http://www.tecmint.com/?p=12218#comment-599546 In reply to Carl.

Dear Carl,
I am sorry, but it is a project developed by us and we have not named it yet. At this point we have not even concluded to publish the software under any particular Licence.

Keep connected!

]]>