Operating System - Linux
1753682 Members
5419 Online
108799 Solutions
New Discussion юеВ

Re: How to create a account with root permission in linux.

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

How to create a account with root permission in linux.

Hi

I am using redhat and suse.

Can we create a account with root permission in linux.?

so that i want to have two root users one is root and another one is new one.

is it possible?
9 REPLIES 9
Ivan Ferreira
Honored Contributor
Solution

Re: How to create a account with root permission in linux.

Is better to use SUDO to delegate privileges. But, you can just change o create new users with UID/GID=0 and they will be root users with another username.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Michael Steele_2
Honored Contributor

Re: How to create a account with root permission in linux.

You truly, do not want more than one account with a UID of zero, which is root. UID zero leaves no footprints and it is such a huge security hole I doubt any corporation in their right mind would let it go without penalty. In the corp's that I have worked for, where many, many owner's exist, sometimes in the hundreds, you would never hear of this.

I am positive, it would not pass Sarbanes Oxley.

Use sudo.
Support Fatherhood - Stop Family Law
Court Campbell
Honored Contributor

Re: How to create a account with root permission in linux.

Very strange question. But outside of sudo, you could just give (trusted) people roots password. Then they could either login as root, or use su.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Steven E. Protter
Exalted Contributor

Re: How to create a account with root permission in linux.

Shalom,

The only account with root permissions is root. user number 1.

Where I last worked we had rootp and rootd and such but they were simply user profiles for different admins who we wanted to grant root privileges to.

If you want to grant root powers to a non admin, you should as noted before me use sudo.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: How to create a account with root permission in linux.

Hi Senthil:

As noted, _ANY_ account with a UID=0 is a root account.

This is not only dangerous from a security perspective, but can be catastrophic for you or another administrator who one day does something like:

# find / -type f -user senthil -exec rm {} +

...thinking that he/she will cleanup after the user who is long gone...

If the account named "sehthil" had been assigned a UID=0 the affect is to have removed files owned by _root_ since a UID=0 is synonymous with the root account.

Do not create multiple root accounts!

...JRF...
Nuwan Alwis
Valued Contributor

Re: How to create a account with root permission in linux.

Hi,
Im also agree with the above post.
My first question would be,
If there is another account which has same system wide access other than root;then its another root account using another name.
Since this doesn't add up any security its very same as sharing root password with another user. ether actual root or that other account run "rm -Rf /var" it doesn't make any difference and the system is gone...!

If any one other than root want to execute commands like root sudo is the recommended way and also you can configure group wheel to assign same rights for a group

By using sudo you can give users rights to commands and you exactly know who has the rights to run what commands on the system and what would be the effect.

Good Luck...!
dirk dierickx
Honored Contributor

Re: How to create a account with root permission in linux.

anything is possible, the question you need to ask yourself is - why would i want to do such insane thing?

as previously mentioned, use sudo to allow other users to execute commands with root rights.

read all this for an insight on how to use sudo and how it works;
http://www.aplawrence.com/Basics/sudo.html
Sivakumar MJ._1
Respected Contributor

Re: How to create a account with root permission in linux.

I agree with all above comments....

Create user using UID/GID=0 option for a root access....

But as best practice only one root user must exist.

SUDO is the best option for your requirement.
Suraj K Sankari
Honored Contributor

Re: How to create a account with root permission in linux.

>>so that i want to have two root users one is root and another one is new one.

is it possible ?

Yes it is, to convert a normal user into root user just change the uid 0 and gid 0 see the example

[root@rspc521 suraj]# grep suraj /etc/passwd
suraj:x:0:0::/home/suraj:/bin/bash

Suraj