Pwgen Tutorial Generate Random Password in Linux Unix

Sometimes we need to generate random password to provide rather secure login mecanism for our system. For example if we want to change password randomly for our ftp user. This can be done by using pwgen command. In pwgen man page, i found explanation to use this command. here i will give u the example:

1. basic usage :
pwgen maxleght,
example basic pwgen command and its result:
%pwgen 8
ookokee

it will generate 8 letter password like ookeokee

2. other usage
pwgen [ -acnsh ] maxlength [ count ]
-a, –alt-phonics
-c, –capitalize
-n, –numerals
-s, –secure

example pwgen commands and its results (following below):

%pwgen -a 8
karaxom

%pwgen -c 12
kiHepaefohu

%pwgen -n 10
da2shijan

%pwgen -s 10
.t`Tq_704-

%pwgen -acn 10
uxo0Utech

but -s option cant be combined with other option because it already generates the strongest password then other combined options such as -acn. -acn option can be used to simplify random password from confusing special character like .`-_ dll.

Leave a Reply

Your email address will not be published. Required fields are marked *