Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was also under the impression user id's are unique.
You can however add your other user to as many groups as possible, in order to simulate the power of root, but if something needs to be really done as root, that user won't be very effectively.
If you just want a cool name for the superuser, change the name root in /etc/passwd /etc/shadow and /etc/group to whatever you want.
When su'ing, you'll need to specify the superuser name though like
normaluser@host $ su supercoolname
<passwd>
supercoolname@host #
ok, i edited the /etc/passwd, by adding
poweradmin:x:0:0:,,,/root:/bin/bash
then, i saved it! go back to my terminal
i su root, then, enter password (this is normal). then
i su poweradmin, (something i have seen before), it
shows sh-2.05b#, instead of [root@localhost root].
i tested on here by prompting some commands that need
authentication by root, such as rpm -ivh ***.rpm.
then, it let me thru, meaning that i have a root power, right now!
so, my question is that, if i do something like this, will this be harmful to my system? thanks!
I personally won't do it, if you just want a cool name, just change the name root to something else.
Superuser name doesn't has to be root after all.
In fact speaking in terms of security, it'd be better if it was something else.
Basically its a security issue having another user with the same power as root. If I was you, I would either su to root when needed or setup sudo. But never give or create a user with the same permissions and power. LQ cannot be held responsible for the damage it can cause to your system on any outcome.
Oh and most likely you have a different bash prompt is that its using the default terminal or command prompt. You can edit this by placing a .bashrc file in your poweradmins home directory.
Just because you can install an RPM doesn't mean you have root power. Try editing a file owned by root to see if you can, that is a better test.
I agree... It's probably not good practice. Like tinkster suggested, check out the sudo program.
I have only tried this when I was going to give root a different login shell, and wanted to make sure that I would be able to get in if something went wrong.
A good example of the system not giving a darn about the name, type "whoami" as your new user.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.