You have 200 servers and user accounts are drifting between them. How do you centralise identity?
IntermediateScenarioUsers, groups and access control
Answer
Situation read → Local /etc/passwd management does not scale; move to a directory service.
What I'd do →
- Pick a source of truth: FreeIPA, Active Directory, or an LDAP behind your IdP.
- Join servers with SSSD (
realm joinfor AD/IPA) and usesssdin/etc/nsswitch.confforpasswdandgroup. - Store SSH public keys in the directory and serve them via
AuthorizedKeysCommand /usr/bin/sss_ssh_authorizedkeys. - Control who may log in per host group with HBAC rules or
simple_allow_groups. - Keep one local break-glass admin per server.
Why → One place to add, remove and audit users; offboarding becomes a single disable.
Interview tip → Mention SSSD caching so logins still work if the directory is briefly unreachable.
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