Wednesday, December 30, 2009

generate/create powerful/customized passwords using the command " pwgen " on Linux Command Line

When anyone registering with a website , it may say " your password must have 8 or more characters and it should be a combination of a-z, A-Z, 0-9, and atleast a symbol. Then what should you do? most probably you have to create a new password to meet with these requirements because you didn't have a password which meets with these requirements.
If you are a Linux user you can use your Linux Command line to create a random, powerful password which can't be guessed by anyone.
First of all you must have "pwgen" to generate new passwords using  Linux Command line. When you type pwgen in your terminal it should show some passwords which has generated randomly. If it show these message similar to this "bash: pwgen: command not found" when you type pwgen, it means you didn't have pwgen installd in your system. So, use your "package manager" to install it. After installing pwgen, you can type pwgen and view some random passwords. You can use pwgen with some options to meet your password requirements. use "pwgen --help" to see available options on the command. This command generates random passwords and you can't see the same password twice by using the pwgen command with the same options.

Here is the syntax you could use this pwgen command to generate passwords.
pwgen [ OPTIONS ] [ pw_length ] [ num_pw ]

  • [ OPTIONS ] -means availabe customizations for pwgen. you can use several options at one time, but all of theose options should not be seperated by spaces or something. but when you start using options, it should contain - mark before the first option that you call.
  • [ pw_length ] is the character length of the password that you need.
  • [ num_pw ] here you can say the number of passwords needed.
when using these options don't use bracket [ ] marks.

Options supported by pwgen:
  -c or --capitalize
    Include at least one capital letter in the password

  -A or --no-capitalize
    Don't include capital letters in the password

  -n or --numerals
    Include at least one number in the password

  -0 or --no-numerals
    Don't include numbers in the password

  -y or --symbols
    Include at least one special symbol in the password

  -s or --secure
    Generate completely random passwords

  -B or --ambiguous
    Don't include ambiguous characters in the password

  -h or --help
    Print a help message

  -H or --sha1=path/to/file[#seed]
    Use sha1 hash of given file as a (not so) random generator

  -C
    Print the generated passwords in columns

  -1
    Don't print the generated passwords in columns

  -v or --no-vowels
    Do not use any vowels so as to avoid accidental nasty words



Technorati Tags: ,

1 comment:

  1. Excellent post and wonderful blog, I really like this type of interesting articles keep it u.
    Click here for more info

    ReplyDelete