How to safely change a user account with UID 0 (other than root) to a non-privileged UID on RHEL
Issue
-
A non-root user account (for example
admin) was created with UID 0, giving it fullrootprivileges. -
The system administrator wants to change this user to a non-privileged UID without breaking services or file ownership.
Environment
-
Red Hat EnterpriseLinux 8.x
-
Local user account with UID 0 (same as
root)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.