7

When we run a command by sudo, the password is asked

[sudo] password for user

If the sudo is not typed the password should not be asked. If asked, I would assume it as a fraud by the application.

How about graphical applications which ask us password through a GUI? If asked for password, how can we differentiate between Linux original password dialogue or a dialogue generated by the application to look like Linux one?

Authentication dialog

2 Answers 2

1

When I worry about this, I run sudo -k; sudo date && sudo -n wooden-horse-command. Then I'll be prompted for the password exactly once (by sudo date), and the sudo ticket should be fresh for the following command.

Not that this gains much in terms of security, you understand. A malicious program that installs a keylogger will be more effective at grabbing your password, even if it isn't run as root.

0

One way might be to run ps -A or ps aux to see what the corresponding process could be if you feel suspicious. Then bring up the original password gui prompt, do a ps again and compare it to the 'suspicious' one.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .