Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to run sudo service lightdm restart command on virtual console, so i pressed Ctrl+Alt+F1 after that VC login prompt appears,

Login:
Password:

I logged into the vc with my login credentials.If i run sudo service lightdm restart command on that prompt, it again asked for sudo password.

~$ sudo service lightdm restart
[sudo] password for avinash:

Why there is a two step verfication proces?

share|improve this question
    
You could ask the same question when login to your account through Unity, Ctrl+Alt+T and run any command with sudo. It prompts for password. The same behavior is being observed in tty1. –  Bleeding Fingers Mar 12 at 8:27

1 Answer 1

The first time you entered your password was to log into your account. The second time it prompted you for your password was because you entered a command starting with 'sudo'.

When you use 'sudo' you are telling the system to run the next command as if you are the root (admin) account. When this occurs it asks for your password again as a security feature in case you decide you don't want to run the command or if it might be an unauthorized person (say you forgot to log out and another person attempted this).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.