Can We Rename Root User in Linux?
Contents

It’s possible to change the name of the root account: edit your passwd file. … Renaming a system account isn’t supported any more than renaming some random system file is supported, or applying rot13 to a system file. There is zero security benefit in renaming the root account.

How do I change the root username in Linux?

Change user to root account on Linux

To change user to root account, simply run “su” or “su –” without any arguments.

Can you rename a user in Linux?

You need to use the usermod command to change user name under a Linux operating systems. … This command modifies the system account files to reflect the changes that are specified on the command line. Do not edit /etc/passwd file by hand or using a text editor such as vi.

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest