You need a shared admin account for an emergency, but auditors forbid shared passwords. What do you set up?
AdvancedScenarioUsers, groups and access control
Answer
Situation read → Break-glass access that is controlled and audited.
What I'd do →
- Create one local
breakglassuser per server with a long random password stored in a vault (HashiCorp Vault, 1Password) that requires approval to check out. - Rotate the password automatically after every checkout.
- Disable its SSH key login; allow console or a dedicated bastion only.
- Alert on any login: an auditd rule or a PAM
pam_exechook that notifies the SIEM. - Test it quarterly.
Why → You still have a way in when LDAP/SSO is down, while every use is traceable to a person.
Interview tip → Mention that SSH certificates with short TTLs from Vault are a modern alternative.
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