tags:

views:

16

answers:

1

i want execute a command need sudo in local machine,so as the doc say i use the local command, but it will ask me input the password,how can i avoid this,is there some place can save my local machine password

local('sudo /etc/init.d/tomcat6 start',capture=True)
+2  A: 

Check the visudo command, which will allow you to edit the /etc/sudoers file, in which you can define users, commands and password-requirements on a machine (e.g. user mlzboy does not need to enter password in order to execute /etc/init.d/tomcat6). Don't forget this can create a security problem.

Sudoers manual

eumiro