Discussion:
Using SWAT?
David McKenna
2011-07-30 18:05:44 UTC
Permalink
I have installed SAMBA for eCS 1.1.0 (3.3.15) as domain controller on eCS
2.1and everything seems to work fine. I have added shares and users with no
trouble. I am able to use SSCC to configure as well.

I would like to be able to use SWAT to configure. I have Apache2 running
and have followed the cookbook for SWAT on the Netlabs SAMBA site. When I try
to use the SWAT web interface, it asks for a user and password, I enter them
then it returns 'Internal Server Error'. The Apache error log says:
'premature end of script headers: swat.exe'. What does that mean?

Has anyone been able to use SWAT with SAMBA for eCS 1.1.0?

TIA,

Dave McKenna
Herwig Bauernfeind
2011-08-01 07:14:35 UTC
Permalink
Hi David,

AFAIR I did test it.

Did you let the Samba installer find and configure Apache for SWAT? The
cookbook is a bit outdated (but still usable, by and large).
Which version of Apache2 are you using?

Unfortunately it is very easy to break SWAT usage - I have seen
"Internal Server Error" quite often, usually there is something broken
in the configuration.

If you provide more details (version, install path, etc), I will try to
rebuild your situation and check if it should work and if not, why...

Regards,
Herwig
Post by David McKenna
I have installed SAMBA for eCS 1.1.0 (3.3.15) as domain controller on eCS
2.1and everything seems to work fine. I have added shares and users with no
trouble. I am able to use SSCC to configure as well.
I would like to be able to use SWAT to configure. I have Apache2 running
and have followed the cookbook for SWAT on the Netlabs SAMBA site. When I try
to use the SWAT web interface, it asks for a user and password, I enter them
'premature end of script headers: swat.exe'. What does that mean?
Has anyone been able to use SWAT with SAMBA for eCS 1.1.0?
TIA,
Dave McKenna
---------------------------------------------------------------------
--
Mit freundlichen Grüßen/
With Best Regards

Herwig Bauernfeind
Piersante Sestini
2011-08-12 08:56:33 UTC
Permalink
Post by Herwig Bauernfeind
Post by David McKenna
I would like to be able to use SWAT to configure. I have Apache2 running
and have followed the cookbook for SWAT on the Netlabs SAMBA site. When I try
to use the SWAT web interface, it asks for a user and password, I enter them
'premature end of script headers: swat.exe'. What does that mean?
Did you let the Samba installer find and configure Apache for SWAT? The
cookbook is a bit outdated (but still usable, by and large).
Which version of Apache2 are you using?
Unfortunately it is very easy to break SWAT usage - I have seen
"Internal Server Error" quite often, usually there is something broken
in the configuration.
If you provide more details (version, install path, etc), I will try to
rebuild your situation and check if it should work and if not, why...
Regards,
Herwig
I have the same problem here
Using apache 2.2.17
Samba version 3.3.16-eCS 1.1.0-613

the relevant section of httpd.conf is
=>
Alias /swat/ "N:/programs/samba/"
ScriptAlias /cgi-bin/samba/ "N:/programs/samba/"
ScriptAlias /cgi-bin/ "D:/apache2/cgi-bin/"

PassEnv UNIXROOT
PassEnv ETC
PassEnv PATH
PassEnv TMPDIR

<Directory "N:/programs/samba">
AllowOverride All
Options None
Order allow,deny
Allow from all
AuthName "Samba Web Admin Tool"
AuthType Basic
AuthUserFile "D:/apache2217/conf/users"
Require valid-user
</Directory>
<=
The path to samba is n:\programs\samba
swat.exe resides there
Samba config is in N:\MPTN\ETC\samba\smb.conf

What is the "samba installer"? I used Warpin and SSCC and they don't
seem to have an option for configuring Apache.
I also see that SWAT has a command line option "Use alternate
configuration file", but I don't have any (except smb.conf, of course).

If I run SWAT from the command line nothing happens (except if I use the
--help or the --version command line options) Even using the -a option
has no effect (and I assume that line options are only intended to be used in a
command window).


Anyway, the problems that I encounter are two:
1)Authentication doesn't work: the error_log says "Configuration error:
couldn't check access. Check your 'Require' directive:
/cgi-bin/samba/swat.exe"
Indeed, swat.exe in this case doesn't even start (and it is not involved
in the issue, which is related to Apache or its configuration)

2)if (just for testing) I REM out authentication lines (from AuthName
on), swat.exe does in fact run in VIO mode in background, but it never
returns anything to the browser, which after a while ends with a Gateway
Time-out Error. Error_log says" Script timed out before returning
headers: swat.exe"
Portscan shows that port 901 remain closed while swat is running.

any suggestion?
thanks
Piersante Sestini
Herwig Bauernfeind
2011-08-12 10:09:21 UTC
Permalink
There is swatsetup.exe which is meant to be run during the Warpin
installation, in case the swat package is selected for installation.
I have to check in detail what it does exactly, its been 2 years since
this was touched last time...
Post by Piersante Sestini
Post by Herwig Bauernfeind
Post by David McKenna
I would like to be able to use SWAT to configure. I have Apache2 running
and have followed the cookbook for SWAT on the Netlabs SAMBA site. When I try
to use the SWAT web interface, it asks for a user and password, I enter them
'premature end of script headers: swat.exe'. What does that mean?
Did you let the Samba installer find and configure Apache for SWAT? The
cookbook is a bit outdated (but still usable, by and large).
Which version of Apache2 are you using?
Unfortunately it is very easy to break SWAT usage - I have seen
"Internal Server Error" quite often, usually there is something broken
in the configuration.
If you provide more details (version, install path, etc), I will try to
rebuild your situation and check if it should work and if not, why...
Regards,
Herwig
I have the same problem here
Using apache 2.2.17
Samba version 3.3.16-eCS 1.1.0-613
the relevant section of httpd.conf is
=>
Alias /swat/ "N:/programs/samba/"
ScriptAlias /cgi-bin/samba/ "N:/programs/samba/"
ScriptAlias /cgi-bin/ "D:/apache2/cgi-bin/"
PassEnv UNIXROOT
PassEnv ETC
PassEnv PATH
PassEnv TMPDIR
<Directory "N:/programs/samba">
AllowOverride All
Options None
Order allow,deny
Allow from all
AuthName "Samba Web Admin Tool"
AuthType Basic
AuthUserFile "D:/apache2217/conf/users"
Require valid-user
</Directory>
<=
The path to samba is n:\programs\samba
swat.exe resides there
Samba config is in N:\MPTN\ETC\samba\smb.conf
What is the "samba installer"? I used Warpin and SSCC and they don't
seem to have an option for configuring Apache.
I also see that SWAT has a command line option "Use alternate
configuration file", but I don't have any (except smb.conf, of course).
If I run SWAT from the command line nothing happens (except if I use the
--help or the --version command line options) Even using the -a option
has no effect (and I assume that line options are only intended to be used in a
command window).
/cgi-bin/samba/swat.exe"
Indeed, swat.exe in this case doesn't even start (and it is not involved
in the issue, which is related to Apache or its configuration)
2)if (just for testing) I REM out authentication lines (from AuthName
on), swat.exe does in fact run in VIO mode in background, but it never
returns anything to the browser, which after a while ends with a Gateway
Time-out Error. Error_log says" Script timed out before returning
headers: swat.exe"
Portscan shows that port 901 remain closed while swat is running.
any suggestion?
thanks
Piersante Sestini
---------------------------------------------------------------------
--
Mit freundlichen Grüßen/
With Best Regards

Herwig Bauernfeind
Piersante Sestini
2011-08-13 00:15:59 UTC
Permalink
Post by Herwig Bauernfeind
There is swatsetup.exe which is meant to be run during the Warpin
installation, in case the swat package is selected for installation.
I have to check in detail what it does exactly, its been 2 years since
this was touched last time...
Correct.
I originally installed Samba without SWAT, and warpin wouldn't allow me
te reconfigure.
I reinstalled it and swatsetup.exe did come out.

I also fixed the authorisation problem by adding to httpd.conf the line
LoadModule authz_user_module modules/authz_us.dll

which for some reason was missing from the file

(by the way, this instruction should be added to
http://svn.netlabs.org/samba/wiki/SWAT)

Thanks a lot

Piersante
David McKenna
2011-08-12 22:43:46 UTC
Permalink
Hi Herwig,
Post by Herwig Bauernfeind
Hi David,
AFAIR I did test it.
OK... good, thanks.
Post by Herwig Bauernfeind
Did you let the Samba installer find and configure Apache for SWAT? The
cookbook is a bit outdated (but still usable, by and large).
Which version of Apache2 are you using?
I am using Apache 2.2.16. It was already installed (by AMPOS/2) and serving
an internal website successfully. Everything is on a single partition (drive
C:) in default locations. I also have RPM/YUM installed, which complicates
some settings - may be the root of the trouble.
Post by Herwig Bauernfeind
Unfortunately it is very easy to break SWAT usage - I have seen
"Internal Server Error" quite often, usually there is something broken
in the configuration.
If you provide more details (version, install path, etc), I will try to
rebuild your situation and check if it should work and if not, why...
Regards,
Herwig
I haven't had any time lately to play with this, but I will triple check my
settings and try again soon.

Regards,

Dave McKenna
Piersante Sestini
2011-08-13 14:22:51 UTC
Permalink
Post by David McKenna
I haven't had any time lately to play with this, but I will triple check my
settings and try again soon.
See my message above. I suspect that you may have the same problem that
I had.

If you have swatsetup.exe in the Samba directory, you may try running it
to configure SWAT (I think that it does something to SWAT, not to Apache)

I didn't have it, so I reinstalled the 3.3.15 wpi over the exising
intallation, and checked the SWAP package (I left the other packages
selected, as I feared that otherwise it would deinstall them, and it
didn't substitute the 3.3.16 files that I had copied there).

Then swatsetup.exe came out and did its magic.

Be also sure to have in httpd.conf an unremmed line
LoadModule authz_user_module modules/authz_us.dll

(for some reason that line was missing altogether from my conf file), as
it seems to be needed by the authorization process.

HTH
Piersante
David McKenna
2011-08-14 12:41:56 UTC
Permalink
Hi Piersante,
Post by Piersante Sestini
Post by David McKenna
I haven't had any time lately to play with this, but I will triple check my
settings and try again soon.
See my message above. I suspect that you may have the same problem that
I had.
If you have swatsetup.exe in the Samba directory, you may try running it
to configure SWAT (I think that it does something to SWAT, not to Apache)
I didn't have it, so I reinstalled the 3.3.15 wpi over the exising
intallation, and checked the SWAP package (I left the other packages
selected, as I feared that otherwise it would deinstall them, and it
didn't substitute the 3.3.16 files that I had copied there).
Then swatsetup.exe came out and did its magic.
Be also sure to have in httpd.conf an unremmed line
LoadModule authz_user_module modules/authz_us.dll
(for some reason that line was missing altogether from my conf file), as
it seems to be needed by the authorization process.
I do have authz_us.dll module loaded, and I tried running swatsetup again,
but I still get the internal server error. I need to do some more checking...

Regards,

Dave McKenna

Andy
2011-08-02 14:19:40 UTC
Permalink
On Sat, 30 Jul 2011 18:05:44 UTC, "David McKenna"
Post by David McKenna
I have installed SAMBA for eCS 1.1.0 (3.3.15) as domain controller on eCS
2.1and everything seems to work fine. I have added shares and users with no
trouble. I am able to use SSCC to configure as well.
I would like to be able to use SWAT to configure. I have Apache2 running
and have followed the cookbook for SWAT on the Netlabs SAMBA site. When I try
to use the SWAT web interface, it asks for a user and password, I enter them
'premature end of script headers: swat.exe'. What does that mean?
Has anyone been able to use SWAT with SAMBA for eCS 1.1.0?
TIA,
Dave McKenna
I don't recall if I tried with version 1.1.0 or not. I had to
backlevel to 1.0.6 and I have it working with it. Version 1.1.0 does
not allow me to delete anything through a share. I can find no attrib
issues, I ran chmod 777 on the files from the server side and it made
no difference, and I rebooted the server to make sure it wasn't
holding the files in use but no help. As soon as I backleveled to
1.0.6 (and fixed the botch I had made then of the shares and users
while backleveling) there is no problems deleting files across a share
(the same files that were not deleteable with 1.1.0). As a side note,
all files always showed -rw-rw-rw- across the share.
Andy

--
Herwig Bauernfeind
2011-08-02 17:20:31 UTC
Permalink
Post by Andy
On Sat, 30 Jul 2011 18:05:44 UTC, "David McKenna"
Post by David McKenna
I have installed SAMBA for eCS 1.1.0 (3.3.15) as domain controller on eCS
2.1and everything seems to work fine. I have added shares and users with no
trouble. I am able to use SSCC to configure as well.
I would like to be able to use SWAT to configure. I have Apache2 running
and have followed the cookbook for SWAT on the Netlabs SAMBA site. When I try
to use the SWAT web interface, it asks for a user and password, I enter them
'premature end of script headers: swat.exe'. What does that mean?
Has anyone been able to use SWAT with SAMBA for eCS 1.1.0?
Did not have time to look into this yet....
Post by Andy
I don't recall if I tried with version 1.1.0 or not. I had to
backlevel to 1.0.6 and I have it working with it. Version 1.1.0 does
not allow me to delete anything through a share. I can find no attrib
issues, I ran chmod 777 on the files from the server side and it made
no difference, and I rebooted the server to make sure it wasn't
holding the files in use but no help. As soon as I backleveled to
1.0.6 (and fixed the botch I had made then of the shares and users
while backleveling) there is no problems deleting files across a share
(the same files that were not deleteable with 1.1.0). As a side note,
all files always showed -rw-rw-rw- across the share
This is really weird. I have heard about this issue, however I am unable
to reproduce it here: I can delete files on a 1.1.0 server through a
share both from eCS clients and Windows Clients.
Could you please open a ticket and provide samba server logs for the
problem. Please also add your smb.conf to the ticket.

Regards,
Herwig
--
Mit freundlichen Grüßen/
With Best Regards

Herwig Bauernfeind
Herwig Bauernfeind
2011-08-05 14:28:57 UTC
Permalink
Post by David McKenna
I have installed SAMBA for eCS 1.1.0 (3.3.15) as domain controller on eCS
2.1and everything seems to work fine. I have added shares and users with no
trouble. I am able to use SSCC to configure as well.
I would like to be able to use SWAT to configure. I have Apache2 running
and have followed the cookbook for SWAT on the Netlabs SAMBA site. When I try
to use the SWAT web interface, it asks for a user and password, I enter them
'premature end of script headers: swat.exe'. What does that mean?
Has anyone been able to use SWAT with SAMBA for eCS 1.1.0?
Ok, just tested SWAT here, it works as it should with 1.1.0
Loading Image...

Likely to be some kind of setup error.

Kind regards,
Herwig
--
Mit freundlichen Grüßen/
With Best Regards

Herwig Bauernfeind
Loading...