Web Hosting Talk







View Full Version : 2 Root Users


mattschinkel
10-06-2002, 04:29 PM
Is there any way of creating 2 Root users?

Also... I know it is possible to change the name of the Root user by changing the name in the shadow and passwd file, but by doing this, will it affect the system in any way? and will it affect my Ensim CP?

CipherVendor
10-06-2002, 04:37 PM
What's the point in having 2 root users?

Why not just disable root logins in sshd_config and require your admins (?) to login with a regular username and su to root.

If you really really want 2 root users, you can just add two usernames to the root group.

mattschinkel
10-06-2002, 04:44 PM
I was just wondering if it can be done.... I have my reasons...
Thanks... I'll try adding another user to the root group....

Right now the root user is as follows :
root:x:0:0::/root:/bin/bash

How do I do to add another root user?

The user that I want to have root access is like this :
support:x:511:511::/home/support:/bin/bash

What do I change it to? Is this right?
support:x:511:0::/home/support:/bin/bash

CipherVendor
10-06-2002, 05:08 PM
edit /etc/group

This should be the first line in the file:

root:x:0:root

To add the support user to the root wheel group:

root:x:0:root,support

mattschinkel
10-06-2002, 05:16 PM
that works ok.... but still does not give all root privleges...
The reason for this is that I would like a backup root user.

Eg. If the root users password gets changed, I would like to be able to change it back if I login as user support

CipherVendor
10-06-2002, 05:22 PM
If the root password ever gets changed you should consider your box cracked.

If you for some reason forget your root password, you can boot into single user mode and reset the root password.

Noldar
10-06-2002, 05:29 PM
Change the uid to 0, so that your passwd file entry looks like

support:x:0:0::/home/support:/bin/bash

Richard

mattschinkel
10-06-2002, 05:56 PM
Thanx Noldar Your suggestion worked. I also took CipherVendor's suggestion and changed the group file.

Thanks Everyone :)