You suspect someone added an extra UID 0 account. How do you check and respond?
IntermediateScenarioUsers, groups and access control
Answer
Situation read → Hidden root accounts are a classic backdoor.
What I'd do →
awk -F: '$3==0 {print $1}' /etc/passwd
awk -F: '$2=="" {print $1}' /etc/shadow # empty passwords
ls -l /etc/passwd /etc/shadow; rpm -V setup 2>/dev/null || debsums -c 2>/dev/null
lastlog | head; last -F | head
If anything besides root shows UID 0, treat the host as compromised: isolate, preserve evidence, and investigate rather than just deleting the line.
Why → An attacker with root can add accounts; removing the symptom leaves the way they got in open.
Interview tip → Mention monitoring /etc/passwd with auditd (-w /etc/passwd -p wa -k identity) or file integrity tools like AIDE.
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