Interview Prep/Linux/Users, groups and access control

The security team wants all interactive shell sessions to time out after 15 minutes idle. How?

BeginnerScenarioUsers, groups and access control
Answer

Situation read → Idle shell and SSH timeouts.

What I'd do →

  1. Shell: create /etc/profile.d/tmout.sh:
TMOUT=900
readonly TMOUT
export TMOUT
  1. SSH: in sshd_config set ClientAliveInterval 300 and ClientAliveCountMax 3, then reload.

Why → TMOUT closes idle bash shells; readonly stops users from unsetting it. Client-alive settings drop dead SSH connections.

Interview tip → Note ClientAlive* detects unresponsive clients, not idle users; TMOUT handles idleness.

All Linux questions Roadmap: Linux

More on Users, groups and access control