0
Obviously, the root user's username is root. Is there a way to change it's username to something else while keeping it's root powers? Example: Change it to webadmin on a http server.
0
Obviously, the root user's username is root. Is there a way to change it's username to something else while keeping it's root powers? Example: Change it to webadmin on a http server.
0
I would advise against it, because some software may depend on there being an account named root. But if you insist:
usermod --root /path/to/mounted/filesystem --login newname root
.The booting to a live-distribution is necessary because usermod
won't let you change the username of an user that has running processes. Note that the above command doesn't change anything else besides the name. You might want to add --home /path/to/new/home --move-home
and you should probably rename the mail spool. See man usermod
for further information.
Did you see How do you rename root? on Unix & Linux stackexchange.
– lx07 – 2020-02-16T16:35:53.823Oh shoot, I couldn't find that, thanks. If you make that an answer I'll accept it. – Half-Life – 2020-02-16T16:44:42.707