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 →
- Shell: create
/etc/profile.d/tmout.sh:
TMOUT=900
readonly TMOUT
export TMOUT
- SSH: in
sshd_configsetClientAliveInterval 300andClientAliveCountMax 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.
More on Users, groups and access control
You need to onboard 50 new developers onto a shared build server, each with their own account and SSH key. How do you do it?BeginnerThree teams share one server and each needs a project directory only its members can write to, with new files staying group-owned. How do you set it up?BeginnerA junior engineer needs to restart nginx but must not get full root. How do you grant that?BeginnerAn engineer leaves the company today. What do you do with their Linux account on 30 servers?BeginnerA service account for a backup tool must exist on every server but nobody should be able to log in as it. How do you create it?BeginnerYour security team requires passwords to expire every 90 days for human users only. How do you implement it?Beginner