That's something you really should not be doing. A machine only should have one administrator with root privileges, because if there are others with full permissions to everywhere, the system's security holes (which are never 100% filled) just multiply. The good way to let other users (than root) do some things with root privileges is to use sudo
. There's this su
command that people can use to become root, but that's just as stupid for several users, because then they would all need to know the root password, and you couldn't tell who of them did something because everybody used the same user. With sudo you can control who
can use what
command as root, and with or without
password. Ok, it's not wise to let do anything without a password, but that's something you can do so I mentioned it also.
Most modern distributions should have sudo installed. What you do in order to use it, is edit /etc/sudoers and configure the user(s)/group(s) that you want to have access to some command (or all, but again, it's foolish to let access anywhere -> then they could access root account anyway, and your system was unsecure again). In some cases it's also needed for those users to belong to the sudo
group to be able to use the command at all. After this is set up, the user can
and they're prompted for their own password, after which the command is run with root privileges (without root login/password needed). When the commanded program exits, no root login is left open (you can specify a time for how long 'sudo' remembers you gave a password to it, so quick subsequent sudo's don't ask for password each time, only after specified time from last command).
Surely the other 3 users don't need root permissions for everything
on the system. Better have one root account (for yourself, if you're the admin), and specify what the other 3 need to be able to do with root privileges
, and then configure sudo so that they can only access those things. Be careful with sudo, if you let the users run something you didn't expect, they might gain root login anyway
for example if you let them run 'su' with sudo, or a shell, they've got root login for everything...
Just assign them UID 0. You must edit the file /etc/passwd
I don't think you could do that. UIDs are unique, or should be at least, and if the system permitted you to have multiple identical UIDs, you could start waiting for a catastrophe. What if somebody wanted to run something as UID=xxxx, but there were two accounts, with different permissions, that had the same UID? Your system couldn't figure out which one to use. It's just insane. I've never tried what happens if you do manually alter passwd and shadow (they've both checked!), but I don't expect it to be anything nice. Root has UID 0, others don't. Use sudo.