Use pin code to login instead of long password 20.04

Solution 1:

You are in charge of choosing your password. Set your password to a pin code, and you will be able to log in with a pin code (short 4 to five digit password).

You are also in charge of security of your computer. Be aware that having a short 4 digit password (pin code) is less secure than having a longer password that can contain more characters.

The graphical user interface has built-in protection against yourself. It will not allow you to change your password to one shorter than 8 characters, or one containing only numbers.

However, you still can set the password of your system to any you want with the command

passwd

in the terminal. Heck, you can even disable your password. In that case, if you are administrator, you should also do an edit so you can continue to use sudo.

A Linux system can be configured to block login after a number of failed attempts. That could increase security when implementing a a short password consisting of only numbers.

Solution 2:

It is not possible

If you are looking for the implementation of PIN based login as in Windows, then Ubuntu has no such thing.

Microsoft says their PIN based login is more or equally secure as compared with passwords. I have no idea if it is true or how it works. However, it is not implemented in Ubuntu or in Linux in general.

See this question in StackExchange for more on Windows PIN implementation.

An alternative

I do not recommend setting up a 4 digit numeric password. Those are easy to crack in a second using brute force. For example, Go to How secure is my password? and enter any 4 digit PIN and see what it says.

You can set up Ubuntu to login automatically when it boots. It is not the same as PIN based login, but it will save you typing the password first thing when you turn on the computer.

To turn on Automatic Login for you. Go to Settings > Users. Make sure you are the user. In the picture below I have three users. You don't want to choose the wrong user.

enter image description here

Second Step: Click on the Unlock button on top right, and enter your password when prompted.

Third Step: slide the **Automatic Login switch to the On position. It is Off in the picture.

You will still need the password for administrative tasks, like the Unlock button in the above picture. This is another difference between Windows and Ubuntu. In Windows you may not be asked for password when you need administrative privileges. Windows may just ask you to click Yes or No. In Ubuntu you will need to enter your password in those cases. This is what makes Ubuntu more secure than Windows.

Hope this helps