Strong passwords, from the terminal or from the Ubuntu desktop

about generates strong passwords

In the next article we are going to take a look at some options to get strong passwords in Ubuntu. A few months ago, in this same blog, an article was published that talked about generate strong passwords from the terminal. In the following lines we will see some more options to obtain strong passwords from the command line. We will also see some applications to do the same from the graphical environment.

Today the importance of using a strong password is stressed everywhere. These must contain multiple letters, symbols, numbers, etc., in order to strengthen it so that our accounts are not an easy target for others. The following commands and procedures have been tested on Ubuntu 18.04 LTS.

Generate strong passwords

Using perl

We will find perl available in the official Ubuntu repositories. It can be easily installed by running the following script in the terminal (Ctrl + Alt + T):

install perl

sudo apt update; sudo apt install perl

After installation it's time to use perl to generate a password. You just have to open a new file through any of the text editors. For this example we are going to create a file called passwordgenerated.pl using Vim:

vim passwordgenerador.pl

Inside the file we are going to paste the following code:

perl file to generate passwords

#!/usr/bin/perl
my @alphanumeric = ('a'..'z', 'A'..'Z', 0..9, 'º', 'ª', '|', '!', '"', '@', '#', '$', '%', '&', '/', '(', ')', '[', ']');
my $randpassword = join '', map $alphanumeric[rand @alphanumeric], 0..9;
print "$randpassword\n"

I do not know who has been the author of these lines, but after testing them it must be said that they do their job. At the end you have to remember save the passwordgenerador.pl file.

Now you can run the following command:

password generated with perl

perl passwordgenerador.pl

As you can see in the previous screenshot, in the output we will see a password ready to be used.

Using pwgen

Pwgen is a utility that will help us when generating secure passwords. It can be easily installed by typing in a terminal (Ctrl + Alt + T):

install pwgen

sudo apt install pwgen

Un example to get a strong password it would be the following command:

running pwgen

pwgen -ys 15 1

In the previous command we use two options. The option "y"Tells pwgen that we are looking to generate a strong password and"s”Tells you that it should include symbols. The number 15 indicates the number of characters and 1 will be the number of passwords of that length that will be generated.

To understand, configure and customize the password generated with pwgen, you can use the help that it offers. Help can be consulted using the following command:

help pwgen

pwgen --help

The two password generation methods mentioned so far are used from the CLI. Next we will see two applications that we will be able to use from the desktop.

Using the Revelation app

about revelation

Revelation is a GUI password management tool for Gnome. Thanks to it, personalized secure passwords can be generated. The application can be installed by typing in a terminal (Ctrl + Alt + T):

install revelation

sudo apt install revelation

After installation, you can start the application via terminal or Ubuntu Dash.

revelation launcher

When the application opens, we must first go to the View menu and select the option "Show passwords".

show passwords revelation

This will allow us to see the generated password visually, instead of just seeing asterisks. After this, we can now select the option "Password generator" in the View menu.

In the dialog box "Password generator”, You can set the password length and also specify if we want to include punctuation characters / symbols in your password.

generate password revelation

After configuration, the button can now be clicked Generate to get a custom password.

Using Keepassx

about keepasx

Keepassx is a cross-platform solution for password management. We can install it in Ubuntu by typing in the terminal (Ctrl + Alt + T):

install Keepassx

sudo apt install keepassx

This application keeps the password in a database and encrypts it using the algorithms Twofish y BEA.

keepassx launcher

Before generating a password, it is necessary to carry out a few previous steps.

generate a new database with keepassX

The first will be create a new database through the menu "Confidential Information”. Now you need to create a new group through the menu "Groups”. After this you have to select "Add entry”Through the menu“Appetizers”. In the window that we will have on the screen we will have to click the button "January”To generate a password.

generate strong password in Keepassx

We will be able to select graphically if we want to include uppercase, lowercase, numbers and symbols in the password. In addition to other options for customization.


Leave a Comment

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

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.