Score:0

Use pin code to login instead of long password 20.04

mx flag

I'd like to be able to log on and use a 4 digit pin code. I've just started using ubuntu and I'm on version 20.04. Also, much of the command line stuff is confusing to me but I am great at doing copy and paste!

pLumo avatar
in flag
Can't you just set a 4 digit password?
us flag
Are you asking about setting a four digit numerical password, or are you asking about multi-factor authentication (where you receive a login pin code on your mobile device, for example, in order to login)?
cn flag
@pLumo that would need 1 extra alteration: after 3 wrong attempts the user should be denied entry regardless if the 4th attempt is correct
cn flag
This will be to your liking: https://www.techrepublic.com/article/how-to-setup-two-factor-authentication-in-linux/
pLumo avatar
in flag
I see. This could be a potential `pam` module then ...
Score:2
cn flag

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.

Fuseteam avatar
mx flag
i think the security issues with a 4 digit and the importantance of limiting the amount of tries need a bit more emphasis in this post. It is far too easy to underestimate the severity of the issue
vanadium avatar
cn flag
I bolded the security warning, which indeed is justified, but textually expanding on it is out of scope of the question.
Score:1
ar flag

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

vanadium avatar
cn flag
What is the specificity of a PIN against a password consisting of 4 digits?
cn flag
@vanadium only 3 attempts when using a PIN and then you are forced to log in with either an admin or your password. A password you can often keep inserting.
vanadium avatar
cn flag
@Rinzwind would probably be good if the user specified this explicit requirement. For me, a PIN is nothing more than an identifying number. It depends on the implementation whether it is blocked after three attempts or more. Besides PIN is quite commonly also a "Postal Identification Number", but let us leave it there for the semantics. My understanding was that the user just wanted a shorter easier token to login.
ar flag
@vanadium according to Microsoft, a PIN can be as complex and long as a password. I suppose they distinguish between the two as they use the password for the Microsoft account password, which one can use to login to multiple Windows computers, while the PIN is device specific and tied to the TPM hardware of a specific machine.....
ar flag
After a 3 wrong PIN entry Windows will ask you to restart the computer to continue. If you continue to try (and fail) after the restart it will block the PIN. Then you will need to use your Microsoft account credential to login. Since Ubuntu home computers are not tied to the Ubuntu One accounts, this cannot be implemented in Ubuntu.
Fuseteam avatar
mx flag
it can kinda be implemented, like a second password which can only be inputted three times before the actual password is required
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.