Description of problem: In order to restart satellite via web ui (Satellite Tools -> Restart), tomcat needs to have /etc/sudoers set up correctly. One of the big differences between RHEL4 and RHEL5 default sudo setup is, that /etc/sudoers on RHEL5 comes with the directive "Defaults requiretty" enabled globally by default. This directive simply tells sudo to run successfully only if the user in question (tomcat in this case) has a real tty -- which obviously is not the case. Satellite installer (install/stage2.pl) contains setup_sudoers() routine, which is supposed to comment this directive out. There are two problems with setup_sudoers(): 1. setup_sudoers() does not comment the mentioned line out at all 2. there's no need to comment this line out globally, all the installer has to do is to add following lines: ... Defaults:tomcat !requiretty Defaults:apache !requiretty ... into /etc/sudoers for things to work correctly on RHEL5. Version-Release number of selected component (if applicable): Satellite 5.2.0 / RHEL5 How reproducible: Always on a RHEL5 system Steps to Reproduce: 1. Install Satellite 5.2.0 on a RHEL5 system 2. tail -f /var/log/tomcat5/catalina.out 3. In the web ui navigate to Satellite Tools -> Restart and restart satellite Actual results: See attachment. Expected output: Satellite should restart successfully.
Created attachment 310421 [details] /var/log/tomcat5/catalina.out
s/^\s*Default\s+requiretty\s*$/#$&/; <-- this is the regular expression from setup_sudoers(), which was supposed to comment 'Defaults requiretty' out. It should have been: s/^\s*Defaults\s+requiretty\s*$/#$&/;
Sending install/stage2.pl Sending install/sudoers.rhn Transmitting file data .. Committed revision 174894.
Modified fix: Sending install/stage2.pl Transmitting file data . Committed revision 174927.
Ported to RELEASE-5.2, r175399.
Mass move to ON_QA.
Verified. Sat restarted without error.
[root@rlx-2-20 ~]# cat /etc/sudoers | grep tomcat tomcat ALL=(root) NOPASSWD: INSTALL_RHN tomcat ALL=(root) NOPASSWD: CONFIG_RHN # These two directives allow tomcat and apache to invoke CONFIG_RHN Defaults:tomcat !requiretty [root@rlx-2-20 ~]# cat /etc/sudoers | grep apache apache ALL=(root) NOPASSWD: INSTALL_RHN apache ALL=(root) NOPASSWD: CONFIG_RHN # These two directives allow tomcat and apache to invoke CONFIG_RHN Defaults:apache !requiretty restart ok.. release pending
5.2.0 Satellite is now GA, bugs Closed for Current Release.