I'm assuming you want to make sure you have an "emergency admin" access, even if your actual administrator screws up (but other than that, you trust the main administrator fully).
A popular approach (although very hackish) is to have a second user with uid=0
, commonly named toor
(root backwards). It has a different password, and can serve as a backup access. To add, you'll likely need to edit /etc/passwd
and /etc/shadow/
(copy the root
lines).
It's all but fail-safe, but if you just need to safeguard against the "main administrator" changing the password without notice, then it will work. It's trivial to disable, by removing the toor
account; so the solvesole benefit is having a separate password.
Alternatively, you may want to look into alternate authentication mechanisms, i.e. ssh
keys, libnss-extrausers
, LDAP etc.
Note that the admin can still screw up badly. For example, by blocking the firewall.
If you want to have a very secure system, consider using SELinux, where the unix user (e.g. root) is also coming with a role, which can be much more fine grained. You may want to give your admin root access, but only a restricted role (e.g. to administrate apache only). But this will require quite a lot of effort on your side to correctly configure the policy right.