13

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?

  • Those are different user sessions. Would you like your sudo also affect other users (not you)? – Sergio Tulentsev Apr 27 '13 at 15:14
  • 3
    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
  • 1
    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
  • 1
    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
19

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

Run visudo and then add a line:

Defaults !tty_tickets
  • 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 supports Monica 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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