visudo set user sudo root
#Defaults targetpw # ask for the password of the target user i.e. root
Defaults requiretty # sudo can only be run from a login session
#add this line for user have root permission
wo ALL=(ALL) ALL
#no password
apache ALL=NOPASSWD: ALL