PSA: On Bookworm sudo session is retained when you logout

The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries.

Post Reply
User avatar
/RaspberryPi
Corporate
Posts: 2449
Joined: Wed Jun 05, 2019 1:29 am

PSA: On Bookworm sudo session is retained when you logout

Post by /RaspberryPi »


By default, sudo remembers the password for 5 minutes since the last sudo command was executed in that terminal. Additionally, if you logout, the sudo session immediately expires. However it seems that on Raspberry Pi 12 (Bookworm), sudo is setup with timestamp_type=global, which means the sudo session is not bound to the terminal anymore. While it is a convenience feature, it may also pose a security risk as any process can make use of your sudo session. The session is also persisted after you logout (for 5 minutes). If you don't like this behavior, remove the file /etc/sudoers.d/010_global-tty.
submitted by /u/CreepyZookeepergame4
[link] [comments]

Source: https://www.reddit.com/r/raspberry_pi/c ... _when_you/
/RaspberryPi
Post Reply

Return to “Raspberry Pi Forum”