Submitted by RedKnot on Mon, 01/03/2011 - 10:33
When we try to manage a mailman mailinglist an empty page appears and the following error appears in /var/webmin.miniserv.error:
Usage: su [-] [ username [ arg ... ] ] [03/Jan/2011:17:16:32 +0100] [195.240.3.7] /virtualmin-mailman/unauthenticated/listinfo.cgi : Missing Content-Type Header
I have no idea when and how su is called?
Status:
Active
Comments
Submitted by JamieCameron on Mon, 01/03/2011 - 13:21 Comment #1
Virtualmin tries to run the mailman CGIs as the Apache user, with a command like :
su -m httpd -c "/bin/sh -c '/path/to/cgi'"
Assuming that
httpd
is the user Apache runs as.Does the -m flag for su work on your Solaris system?
Submitted by RedKnot on Mon, 01/03/2011 - 13:41 Comment #2
http://docs.sun.com/app/docs/doc/817-0880/6mglau86g?l=ru&a=view
The -m flag is not valid on (Open)Solaris but without flags the environment is preserved.
Submitted by JamieCameron on Mon, 01/03/2011 - 16:58 Comment #3
Ok, that would explain it ... Virtualmin tries to use the -m flag so that su stil works even if the user doesn't have a valid shell. However, it should only be using this on Solaris 11+ ... which OpenSolaris version are you running there?
You can see what version Webmin thinks it is with a command like :
grep os_ /etc/webmin/config
Submitted by RedKnot on Tue, 01/04/2011 - 02:33 Comment #4
Submitted by JamieCameron on Tue, 01/04/2011 - 13:02 Comment #5
Interesting, it looks like OpenSolaris 11 and regular Solaris 11 don't have the same
su
command?A hack work-around to fix this would be to edit
/etc/webmin/config
and change theos_version
line to :os_version=10
Let us know if that helps ..
Submitted by RedKnot on Tue, 01/04/2011 - 13:43 Comment #6
Hi Jamie,
After changing to OS version the 'su' warning is gone but the manage mailinglist pages are still empty. Now there are no error messages in the error log.
Submitted by JamieCameron on Tue, 01/04/2011 - 20:03 Comment #7
Hmm, I'm not sure if that is much progress :-(
Can you actually use
su
to run commands as the Apache user? Something like :su httpd -c "echo hello"
Submitted by RedKnot on Wed, 01/05/2011 - 10:36 Comment #8
[17:35:04] munnik@prince ~ $ pfexec su httpd -c "echo hello" su: Unknown id: httpd [17:35:13] munnik@prince ~ $ pfexec su webservd -c "echo hello" hello
I assume virtualmin is aware of the fact that the webserver user is not httpd but webservd?
Submitted by RedKnot on Wed, 01/05/2011 - 10:36 Comment #9
Which command is actually called when the su is executed?
Submitted by JamieCameron on Wed, 01/05/2011 - 23:05 Comment #10
It depends on which page in Virtualmin is being accessed.
The best way to see what commands are being run is to go to Webmin -> Webmin Configuration -> Debugging Log File, and change "Debug log enabled?" to "Yes". Then check the box "Commands executed" , and de-select everything else in "Events to log".
Then try accessing the mailman page, and see what command is logged in
/var/webmin/webmin.debug