You are not logged in.

#1 2017-03-10 10:24:04

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

generate passwords

Hi,
I wanted to share you something I've founded usefull:
Even we have to create safetly passwords for differents types of accounts or sessions..., and linux terminal can do it for you !
I made a mini-script that you can call in the terminal like that:

~/bin/creapwd.sh 32

make for you a password with 32 characters. Of course you can change the value you want.
That's it
creapwd.sh:

#!/bin/bash

# script to create pwd
##cat /dev/urandom|tr -dc _A-Z-a-z-0-9 |head -c60
# ex.: pwd with 32 characters: ~/bin/creapwd.sh 32

numcara=$1

tr -d -c "a-zA-Z0-9" < /dev/urandom | head -c "$numcara"

exit

Offline

#2 2017-03-10 11:02:40

shot-in-the-head
Member
Registered: 2015-10-28
Posts: 61

Re: generate passwords

Handy, thanks!

Offline

#3 2017-03-10 14:31:24

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: generate passwords

Great, works for me, thanks!

There is only one minor issue with the passwords created: It only has letters and numbers, but no special characters like !"§$%&=)(/ etc. - so it'd be easier for someone to make a brute-force attack (although over 20 characters are basically ok even without signs).

Offline

#4 2017-03-10 14:36:56

porkpiehat
Member
Registered: 2015-10-27
Posts: 31

Re: generate passwords

martix wrote:

Great, works for me, thanks!

There is only one minor issue with the passwords created: It only has letters and numbers, but no special characters like !"§$%&=)(/ etc. - so it'd be easier for someone to make a brute-force attack (although over 20 characters are basically ok even without signs).

man pwgen wrote:

       -y, --symbols
              Include at least one special character in the password.

Offline

#5 2017-03-10 16:26:03

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,697

Re: generate passwords

^ Other possibilities:  smile

apt-cache policy makepasswd
makepasswd:
  Installiert:           (keine)
  Installationskandidat: 1.10-9
  Versionstabelle:
     1.10-9 0
        500 http://ftp.rrzn.uni-hannover.de/debian/debian/ jessie/main amd64 Packages

apt-cache policy apg
apg:
  Installiert:           (keine)
  Installationskandidat: 2.2.3.dfsg.1-2
  Versionstabelle:
     2.2.3.dfsg.1-2 0
        500 http://ftp.rrzn.uni-hannover.de/debian/debian/ jessie/main amd64 Packages

apt-cache policy gpw
gpw:
  Installiert:           (keine)
  Installationskandidat: 0.0.19940601-8.1
  Versionstabelle:
     0.0.19940601-8.1 0
        500 http://ftp.rrzn.uni-hannover.de/debian/debian/ jessie/main amd64 Packages

Offline

#6 2017-03-10 20:18:26

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: generate passwords

@porkpiehat Sorry, I was referring to the bash script in the OP, but it looked like I was talking about pwgen. Thank you for that link @earlybird, that looks like a very useful utility.

Offline

Board footer

Powered by FluxBB