Startec

Startec

How to Show Asterisks While Typing Sudo Password in Linux

Mai 21, às 14:53

·

2 min de leitura

·

0 leituras

When using the sudo command in Linux, it is common to be prompted for the user's password. However, by default, the password is not displayed on the screen while typing. This can be a security feature, but it...
How to Show Asterisks While Typing Sudo Password in Linux

Terminal

When using the sudo command in Linux, it is common to be prompted for the user's password. However, by default, the password is not displayed on the screen while typing. This can be a security feature, but it can also be inconvenient if the user needs to verify what they are typing.

But we can enable asterisks to show while typing the sudo password, follow simple steps:

  • Open the terminal and type the following command:
sudo visudo

Enter fullscreen mode Exit fullscreen mode

sudo visudo is a command in Linux that allows a user with administrative privileges to edit the sudoers file, which contains the rules for the sudo command. This file determines which users are allowed to run sudo and what commands or actions they are allowed to execute with it. The visudo command ensures that the file is edited safely and consistently, and checks for syntax errors before saving the file.

  • Enter your password when prompted. Note that the password will not be displayed on the screen. This will open the sudoers file in the terminal.

Terminal

  • Look for the line that contains the following text:
 Defaults env_reset

Enter fullscreen mode Exit fullscreen mode

  • Add the following text after it:
 Defaults pwfeedback

Enter fullscreen mode Exit fullscreen mode

Terminal

  • Save and exit the file, by pressing Ctrl+X , then Y , and then Enter if you are using nano else :wq if using vim/nvim

  • Now, when the user types sudo in the terminal and is prompted for their password, asterisks will appear on the screen as they type.

Terminal

It is worth noting that this feature may not be available in all versions of Linux or in all terminals. Additionally, displaying the password as it is typed can be a security risk if other people are present who should not see the password. Therefore, use this feature with caution and only when necessary.


Continue lendo

DEV

Announcing Support For Playwright Testing On Real Android Devices 🎭📱
Attention, developers and testers! Get ready to elevate your mobile testing experience as we are excited to announce the support for Playwright, a cutting-edge web automation framework for Android automation...

Hoje, às 11:07

DEV

Top 6 PHP code quality tools 2023
PHP is a popular programming language for web development that powers a large number of websites and internet-based applications. Code quality is extremely important when working as a PHP developer. Tools for...

Hoje, às 11:05

AI | Techcrunch

Wellplaece wants to put a smile on dentists’ face with new supply procurement marketplace
There are nearly 186,000 dentist businesses in the U.S., and at any given time, they are replenishing supplies. The process of doing so was traditionally fragmented, with offices relying on between three and...

Hoje, às 10:45

DEV

SQL injection and AWS
Today, we're tackling the topic of "SQL injection," a complete bad boy story. Here's where our superhero, a mighty cloud service provider like Amazon Web Services (AWS), enters the scene, fighting against SQL...

Hoje, às 10:03

Showmetech

Lançamentos do cinema em junho de 2023
Índice Homem-Aranha: Através do Aranhaverso (01/06)Urubus (01/06)O Último Ônibus (01/06)Boogeyman: Seu Medo é Real (01/06)A Era de Ouro (01/06)Transformers – O Despertar das Feras (08/06)Nosso Lar –...

Hoje, às 09:07

DEV

The Dynamic Duo: React and TypeScript - A Match Made in Web Development Heaven
In the fast-paced realm of web development, two technologies have emerged as superheroes, wielding immense power and reshaping the landscape. Enter React, the reigning champion of front-end frameworks, and...

Hoje, às 09:05

DEV

Beginner's Guide to CRUD Operations in Apache age
Cypher is a query language specifically designed for querying and manipulating data in graph databases like Apache age. It provides a simple and expressive syntax for performing CRUD operations (Create, Read,...

Hoje, às 08:22

DEV

AWS open source newsletter, #158
May 30th, 2023 - Instalment #158 Welcome Hello and welcome to the AWS open source newsletter, #158. I hope some of you were able to catch the last episode of season two of Build on Open Source where we...

Hoje, às 07:50

DEV

What's the Most Unusual Thing You've Discovered While Coding?
Once suspended, devteam will not be able to comment or publish posts until their suspension is removed. Once unsuspended, devteam will be able to comment and publish posts again. Once...

Hoje, às 07:00

DEV

Coding Fuel: What Are Your Go-to Snacks?
Once suspended, codenewbieteam will not be able to comment or publish posts until their suspension is removed. Once unsuspended, codenewbieteam will be able to comment and publish posts again. ...

Hoje, às 07:00