Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sudo root permissions are given for specific time, but only for one terminal. If I want to use sudo in another terminal in that time period, I have to type password again. How to force sudo to works across terminals?

share|improve this question

migrated from Apr 28 '13 at 0:52

This question came from our site for professional and enthusiast programmers.

Those are different user sessions. Would you like your sudo also affect other users (not you)? – Sergio Tulentsev Apr 27 '13 at 15:14
run screen after you start a shell with sudo? – jordanm Apr 27 '13 at 15:24
When I open two terminals in my window manager, from my (human) perspective it is one session. I want sudo affects every process run by me (the same user) using command sudo. I don't think I want too much. I really don't like when somebody gives me negative points, just because they never ask themselves such questions. – Tomek Wyderka Apr 27 '13 at 15:26
Upvoting, if only because I'm curious as to how I'm viewing the opposite behavior: entering a password in one shell allows password-less sudo in other shells on the same machine. – chepner Apr 27 '13 at 16:35
Running screen via sudo kinda defeats the entire point of sudo, doesn't it? You could as well use su by that point. – Staven Apr 27 '13 at 23:16
up vote 10 down vote accepted

Turn off tty_tickets. See sudoers(5) for more information.

Run visudo and then add a line:

Defaults !tty_tickets
share|improve this answer
This is the feature I'm looking for! Great. (Disable it by Defaults !tty_tickets) – Tomek Wyderka Apr 28 '13 at 5:23
@TomekWyderka by running visudo or editing /etc/sudoers – Prof. Falken Apr 9 '15 at 9:38
@Prof.Falken by visudo. Actually, you cannot change sudoers file by normal editing (or maybe I'm wrong) – Tomek Wyderka Apr 9 '15 at 13:15

You must log in to answer this question.

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