I am looking for a way to share admin privileges on some hosts without providing the admin password.
From his link, I was thinking of using a primary host from which every user can
sudo -u user to have access to the specific SSH key and connect to the other computers without any password.
The SSH keys have strong passphrases and are loaded in the memory by an admin.
If userA needs root access to lan1 computers, we just add him to the
sudoers file as :
userA ALL= /bin/su - lan1 where lan1 is another user containing an SSH key accepted by all hosts on lan1.
Then, userA can have access to the specific SSH key at user lan1 and do
sudo su - lan1 ssh root@[computer_in_lan1] without knowing any root password.
Problem is that I need to enable root SSH login for lan1 and this is a bad thing. I am wondering : root login would require an SSH key so guessing anything would be impossible, what is the risk except tons of bots logs ?
Now, are there any solutions for sharing a root access without having to share the password ?