Feedback

type to search

how to have sudo powers shared between different bash sessions

Asked by [ Editor ] , Edited by vrkalak [ Moderator ]

There’s a recent change that threw away the powers I enjoyed. These powers removed the need for me to retype passwd for sudo access in a different bash session, if it hasn’t expired.

or Cancel

1 answer

6

rhonda [ Editor ]

This is guarded by the tty_tickets setting, see man 5 sudoers about it:

tty_tickets   If set, users must authenticate on a
per-tty basis. With this flag
enabled, sudo will use a file named
for the tty the user is logged in on
in the user's time stamp directory.
If disabled, the time stamp of the
directory is used instead. This
flag is on by default.

So you might want to disable it. This is done by setting it in the Defaults, with a line like Defaults !tty_tickets. Notice that several default switches are to be meant comma seperated.

NN comments
tshepang
-

strange that this wasn’t documented in the Debian changelog; thanks! my life is so much easier now!

rhonda
-
That’s because it wasn’t a Debian specific change but an upstream change. It’s mentioned in changelog.gz and especially NEWS.gz below “What’s new in Sudo 1.7.4?”:

* The tty_tickets sudoers option is now enabled by default.
gabe
-

Be careful if you offer SSH access to remote users, as you could unintentionally allow them to share elevated privileges with you if you disable tty_tickets.

or Cancel

Your answer

You need to join Debian to complete this action, click here to do so.