Profile Applicability:
Level 1
Description:
Duplicate User IDs (UIDs) can cause conflicts in user identification, permissions, and auditing. Ensuring unique UIDs maintains system integrity and prevents unauthorized access or privilege escalation.
Rationale:
Preventing duplicate UIDs avoids confusion in user management and reduces risks related to identity and access control.
Impact:
Pros:
Maintains clear and consistent user identity management.
Simplifies auditing and access control.
Cons:
Renaming or removing duplicate user accounts may disrupt workflows if not carefully handled.
Default Value:
Duplicate UIDs may exist due to misconfiguration or manual errors.
Pre-requisites:
Root or sudo privileges to review and modify user accounts.
Remediation:
Test Plan:
Using Linux command line:
List all UIDs and identify duplicates:
cut -d: -f3 /etc/passwd | sort | uniq -d
Verify that the output is empty, indicating no duplicates.
Implementation Plan:
Using Linux command line:
For each duplicate UID found, change the UID to a unique value:
usermod -u <new_uid> <username>
Ensure user files and permissions are updated accordingly.
Backout Plan:
Using Linux command line:
Restore original UIDs from backups if needed.
Reassign ownership of files and permissions if necessary.
References:
CIS Amazon Linux 2 Benchmark v3.0.0