Why does sudo ask for a password




















Normally root and your username will have different passwords and only the system administrator will know the root password. It is a little different on a 1 user system where your username and root's password tend to be the same.

So while it may been like you already have been authorized this is not the full picture It is possible to use your root account to log on, removing the need to sudo. However, that practice is discouraged since it would expose the system to serious threats. Ubuntu Community Ask! Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?

Learn more. Why is sudo by default asking for the password of the user that ran it? Ask Question. Asked 6 years, 7 months ago. Active 6 years, 7 months ago. Viewed 1k times. So why does sudo need to ask for authentication again? NOTE: I'm not actually trying to disable the password; just asking from curiosity. Sudo immediately after login asks for password [closed] Ask Question.

Asked 6 years, 7 months ago. Active 6 years, 7 months ago. Viewed 2k times. Improve this question. That sounds like a very bad practice. You're opening up everything connected with your session time to be a possible privilege escalation vector. Add a comment. Active Oldest Votes. I really sincerely do not recommend it. Improve this answer. Jenny D Jenny D Hyppy Hyppy I don't believe it would be a good thing at all Zoredache but once you know the mechanism, as others have pointed out, there are ways to circumvent it.

I'm sure Tom is fully aware of the implications though. Tom Newton Tom Newton 3, 2 2 gold badges 22 22 silver badges 28 28 bronze badges. Community Bot 1. In this case, just because you can does not mean you should. How did you add yourself to sudoers files? From your post I have the idea that you are used to a different distribution. It that true? Of course you should never have the same password for root and for any of your normal users.

Only use this together with 'Defaults targetpw'! There are two levels of "right" solution: When it does what you want, then this is the right solution for you. When you think it is "right" not to ask for the root paassword in the moment you are going to do something as root, I am not with you.

I have seen to much instances of system managers cutting their fingers off inclusdng myself in more then 20 years of Unix system management even when a password is asked for. I agree with you , but as this is my desktop and not a machine used by others I really think there is not much difference as long as both those passwords are known only to me and are safe.

Originally Posted by shalom



0コメント

  • 1000 / 1000