I have aegir installed on a vmware iso of centos5 from thought police. The only issue I'm having is that my aegir user cannot restart apache.
I have the aegir user configured correctly in the sudoers file, and can restart apache just fine when switching to that user and running from command line with no password. The odd thing is that when I queue up a task, and manually run the dispatcher, when the task goes to restart apache, the text from the apachectl password prompt displays. Is that right? Does it have something to do with my problem?
from my hostmaster dir, i run
-bash-3.2$ php /var/aegir/drush/drush.php --uri=http://aegir-macbook.localdomain hosting dispatch
then this gets printed out.
-bash-3.2$ Password:
In my sudoers file, i added:
aegir ALL=NOPASSWD: /usr/sbin/apachectl
and commented out "Defaults requiretty"
Thanks,
Eric.
Comments
Comment #1
Anonymous (not verified) commentedHi,
If you view your Web Server node in the frontend (likely /node/3), what is the 'Restart command' ?
Comment #2
emackn commentedRestart command: sudo /usr/sbin/apachectl restart
Comment #3
emackn commentedalso tried /etc/init.d/httpd restart, same problem
Comment #4
emackn commentedIf httpd is running as root, is that a problem? Should it be running as aegir?
id output:
-bash-3.2$ id
uid=101(aegir) gid=103(aegir) groups=48(apache),103(aegir)
-bash-3.2$ ps -ale | grep httpd
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
1 S 0 6642 1 0 78 0 - 71527 stext ? 00:00:00 httpd
5 S 48 6643 6642 0 81 0 - 71527 stext ? 00:00:00 httpd
5 S 48 6644 6642 0 84 0 - 71527 stext ? 00:00:00 httpd
5 S 48 6645 6642 0 83 0 - 71527 stext ? 00:00:00 httpd
5 S 48 6646 6642 0 83 0 - 71527 stext ? 00:00:00 httpd
5 S 48 6647 6642 0 83 0 - 71527 stext ? 00:00:00 httpd
5 S 48 6648 6642 0 83 0 - 71527 stext ? 00:00:00 httpd
5 S 48 6649 6642 0 85 0 - 71527 stext ? 00:00:00 httpd
5 S 48 6650 6642 0 85 0 - 71527 stext ? 00:00:00 httpd
Comment #5
emackn commentedfound this in /var/log/secure:
Oct 29 17:35:23 aegir-macbook sudo: pam_unix(sudo:auth): conversation failed
Oct 29 17:35:23 aegir-macbook sudo: pam_unix(sudo:auth): auth could not identify password for [aegir]
Comment #6
anarcat commentedYour sudo configuration is broken. Try running the task with --debug to see the exact task log.
Comment #7
pyrello commentedI don't know if this pertains or not, but I had to change:
aegir ALL=NOPASSWD: /usr/sbin/apachectl
to:
aegir ALL=NOPASSWD: /usr/sbin/apache2ctl
However, I am running on debian, so I'm not sure if that would apply to centos.
Comment #8
adrian commentedCheck out the centos hints file :
http://git.aegirproject.org/?p=provision.git;a=blob;f=docs/HINTS_CentOS....
closing due to lack of response from original poster.