Small terminal change suggestion

Suggestions and feedback for Linux Mint and the forums
Forum rules
Do not post support questions here. Before you post read: Where to post ideas & feature requests
Post Reply
RETNUH

Small terminal change suggestion

Post by RETNUH »

I have noticed that people have trouble with entering their password into the terminal as it doesn't show anything when you input. Perhaps *s could be put in as the person types the password?
User avatar
xenopeek
Level 25
Level 25
Posts: 29597
Joined: Wed Jul 06, 2011 3:58 am

Re: Small terminal change suggestion

Post by xenopeek »

You can not display *s while entering a password with sudo on the terminal, without changing source code. You can however easily make sudo pop up a graphical dialog.

Create a file called askpass.sh in your home folder. Edit it, and put the following in it:

Code: Select all

#!/bin/sh
/usr/bin/zenity --entry --hide-text --text="Enter password:" --title="sudo"
Make the file executable (chmod +x askpass.sh).

Edit (or create) the file .bashrc in your home folder (gedit ~/.bashrc) and put this line at the end:

Code: Select all

export SUDO_ASKPASS=~/askpass.sh
alias suda='sudo -A'
Now any time you run a command with "suda command" instead of as "sudo command", it uses askpass.sh to ask you for your password. It pop ups a small dialog window where you can enter your password, and it will show *s.
Image
Post Reply

Return to “Suggestions & Feedback”