Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
    
Yes, but as I said earlier, I want this behavior for specific IPs. P.S. Not duplicate :) –  Alex Rose Apr 25 '13 at 11:31
    
opps sorry ...deleted –  Qasim Apr 25 '13 at 11:36
    
possible duplicate of sudoers - simple explanation requested –  hbdgaf Apr 26 '13 at 0:16
    
this other duplicate has in one of the answers the host syntax –  hbdgaf Apr 26 '13 at 0:16
    
been there, done that. no success. –  Alex Rose Apr 26 '13 at 12:45

1 Answer 1

up vote 0 down vote accepted

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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