0

It is possible to log in automatically as root after typing sudo su - without entering password again? I know it is not safe, but I want this behavior just for specific IP addresses

Thank you, Alex

0

You can use a host alias in the sudoers file to specify specic IPs, or subnet ranges ie:

Host_Alias  MAIL = 10.0.0.0/255.255.255.0
Host_Alias  FTP = 10.1.0.1, 10.2.0.1

alice   MAIL = (ALL) NOPASSWD: ALL
bob          FTP = (ALL) NOPASSWD: ALL
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.