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

1 Answers1

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
VTC
  • 88
  • 1
  • 6