I have access to a CentOS server with a user that its not root but belongs to the sudoers list. I do not have the password of root, nor I can't find out what it is (policies of the people who gave me access to the server).
I want to enable SSH login with root, meaning I don't want to keep logging in to the server with some user, and always do sudo su - in order to do about anything. So far I was able to enable SSH login with my user and a passphrase, which is nice, but I would like to be able to login directly in the root user.
Can I do this without the password of root? How? Any links/books or information would be appreciated.
I don't know if the reason why I need this is relevant to the question, but is this:
I have 64 machines just like this server, and I have to install in each of them some software. In order to do this, I set up a passwordless SSH and a bash script that installs the software in each machine. The thing is, the software I need to install requires root permissions and if I include in the bash command sudo su I have to write 64 times the same password each time that command appears in the script. That's why I need to enable ssh login with root somehow.
sudo su -? Normally,su -should ask you for root's password. For that mattersudo *some command*will allow you to perform maintenance tasks on the server in question. I think you need this tip over at Google Chromium that relaxes sudosudo su -, but it asks me for my user's password. Thanks for the link, I will check it out.sudo suasks for your password to account for sudo, butsu -should ask for root's password. You aren't being asked for it because sudo is overriding it. What are you trying to do as root?su -is run, you are already effectively root fromsudoand as such, no additional password is needed. Root can runsuwith no password.sudo suI have to write 64 times the same password each time that command appears in the script. So I need to enable ssh login with root somehow.