Re: Second ROOT account

From: Bill Unruh (unruh_at_string.physics.ubc.ca)
Date: 08/26/03


Date: Tue, 26 Aug 2003 04:59:24 +0000 (UTC)

pbs <pnews@lomarline.freeserve.co.uk> writes:

]Saikat Guha wrote:
]> Sybren Stuvel wrote:
]>
]>>Eric enlightened us with:
]>>
]>>>I would create a second root account on my machine ? How can i do
]>>>it ? (i have Red Hat 9)
]>>
]>>You can't. You can give other people (limited or unlimited) root
]>>access with 'sudo' though.
]>
]>
]> You can add another user with uid=0, gid=0 in the /etc/passwd file. Although
]> they will have their own username and password for login purposes, once
]> they log in, the shell variables and the prompt etc will still say root.

]They may not. I think that this is undefined behaviour, it depends what
]algorythm is used for accessing the password file. I would not bet my
]system on this.

?? An experiment will make it clear.
On login, the getpwnam is used, since that is the only info the system
has
The getpwnam() function returns a pointer to a structure containing the
       broken out fields of a line from /etc/passwd for the entry that
matches
       the user name name.

>From this the uid is obtained, which in this case is 0. Thereafter as
always with Linux, the uid is used, which is uid 0

I have often done exactly this-- had two names with uid 0, both in SunOS
and in Linux, and it has always worked fine.

]I suggest that you use "sudo" or set up a root group in /etc/group and
]alter the group permissions on those files which the group needs to
]alter.



Relevant Pages

  • Re: Rename root to avoid hacking?
    ... Those are remote attacks, ... root user by name, but I am absolutely certain that no system-local ones ... By using the UID instead of the username, ... ...reach exactly the same SMTP daemon welcome banner. ...
    (comp.os.linux.security)
  • Re: HELP! Is that possible "creating a user named root but acturally not the administrator root"
    ... UID zero. ... Then root will still exist, but it will not be possible to log in to ... The OP asked if it is possible to name a different account root - eg ... the FreeBSD system comes automatically set to you cannot log ...
    (freebsd-questions)
  • Re[2]: accounting with ipfw (gid, uid riles)
    ... MS> The uid associated with a socket is the uid of the process which created ... it's still accounted to root. ... far, is adding alias interface, bind squid to this interface and count ...
    (FreeBSD-Security)
  • Re: Root is root no more
    ... > they required root access. ... > cchsu etc, cchsu being the first root uid account. ... > pwconv'd the file, added the passwd for these accounts, changed the $HOME ...
    (comp.unix.solaris)
  • Re: Question about SELinux and root privs
    ... "root" is just a normal user now, ... Yep, UID 0 of course, the username doesn't matter. ... > Well one of the points of SELinux seems to be there isn't any ... > account, and/or add/modify any privileges at will ... ...
    (comp.os.linux.security)