LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   4MLinux (https://www.linuxquestions.org/questions/4mlinux-115/)
-   -   Change the "Root" Username (https://www.linuxquestions.org/questions/4mlinux-115/change-the-root-username-4175553243/)

Cegar31 09-11-2015 01:28 PM

Change the "Root" Username
 
How to change the username? "root" is default.
And, I want to change it.

rtmistler 09-11-2015 01:45 PM

Leave root it is the system administrator.

DO NOT try to change it.

DO NOT try to delete it.

Add a new user via the useradd command.

Cegar31 09-11-2015 01:54 PM

How to do it?

rtmistler 09-11-2015 01:58 PM

Quote:

Originally Posted by Cegar31 (Post 5419027)
How to do it?

Add a new user via the useradd(8) click on the link command.

zk1234 09-11-2015 02:44 PM

Please leave this root alone. You are able to add a new user in the way described by @rtmistler, but you would also have to grant privileges to this new user. It's not easy when you must do it with BusyBox.

PS.
4MLinux automatically creates users (and sets their privileges) for server software and some desktop applications (e.g. Chrome).

zk1234 09-11-2015 02:56 PM

Oops!
There is no "useradd" applet in BusyBox. The "adduser" applet must be used instead.

Cegar31 09-11-2015 02:59 PM

Quote:

Originally Posted by zk1234 (Post 5419047)
Oops!
There is no "useradd" applet in BusyBox. The "adduser" applet must be used instead.



Thanks!

rtmistler 09-11-2015 03:18 PM

Quote:

Originally Posted by zk1234 (Post 5419047)
Oops!
There is no "useradd" applet in BusyBox. The "adduser" applet must be used instead.

Reason #237 for "Why I hate Busybox"

OK I'm exaggerating.

Honestly over recent years I've given it some thumbs up because it's seemed to have improved and really followed the system commands way better. Example years ago things like ls, or grep did not adhere to the real system calls and hence if you used them in a script you could not use certain features, sometimes the very features you needed. But that was like 10+ years ago and I've encountered it on systems and found it to be improved.

Good detection zk1234! :) I'm disappointed that they felt necessary to swap the command name around though.

sgosnell 09-12-2015 09:56 AM

They didn't just swap the name around. Useradd and adduser do things differently. Adduser is easier to use, since it's interactive and does more and better housekeeping. Useradd isn't used as much these days, AFAICT. I haven't bothered with it in years.


All times are GMT -5. The time now is 03:58 PM.