![]() |
Running SWAT in 10.2
Does anyone know how to get SWAT (the web front end for configuring SMB) running in 10.2? Going by what the man page says dosent seem to work.
|
there's a hint in the works.
go here:
http://www.macosxhints.com/article.p...70699#comments but maybe someone could cover it here, for all of the impatient souls that have tried, unsuccessfully, to get SWAT running... (that would be me...) :confused: |
errors
I did it like the instructions said but when I connect to http://localhost:901/ i get:
400 Server Error chdir failed - the server is not configured correctly anyone know why? |
I didn't edit the xinetd.conf file but instead edited the services and inetd.conf files, as one would have done to enable SWAT in 10.1. I do not know if this is logistacally correct but it works fine. In the inetd.conf file, I added
swat stream tcp nowait.400 root /usr/sbin/swat swat And in the services file, I added swat 901/tcp Hope this helps. If someone can tell me if and why this is wrong, what with xinetd being in 10.2 (dont know much about it), just let me know. |
typos would make it now work, eh?
i did the same thing, but since i tried it at like, 3am, i typoed the whole thing and didn't look at it since... rebooting now.....
today's dumbass award goes to me... |
I supplied a hint this morning doing just this. You just need to start swat from inetd or xinetd (xinetd being the newly preferred method according to Apple....).
I didn't save the text...so look for the hint soon. |
I would recommend Webmin. Great for administering all things OS X. Includes SMB configuration with SWAT.
|
OK, after some checking around, I realize i shouldnt have posted my last post. xinetd is a lot better than inetd and does not require you to even add anything to the service file. I found how to get swat working with xinetd and got it working for me. I found it on this page:
http://us6.samba.org/samba/docs/man/swat.8.html just be sure to create the file using sudo or su Hope this helps...moreso than my last post, heh |
still nothing...
Well, i rechecked all my code for the inetd.conf method and I still get:
400 Server Error chdir failed - the server is not configured correctly when i try and access SWAT... I also tried the xinetd method and that did nothing. tripple checked all premissions and settings, also this is on a brand new clean install of 10.2. this is really driving me nuts, anyone got sugestions of a way to add windows shares without editing the smb.conf file manually? |
double check the services file in /etc
if you haven't already make sure that:
Code:
swat 901/tcpit works here, and from what i've read the hint is in the pipe, maybe we'll have proper documentation for the weekend... |
Try this ...
I have found that inserting the line "groups = yes" into the swat file located in /etc/xinetd.d/swat seems to do the trick. I don't know why it works but some knowledgeable person out there may want to answer that. Also make sure that you change the server line to read "server = /usr/sbin/swat".
|
Done both of those and still nothing:
"swat 901/tcp" in services file "groups = yes" in swat file in xinetd.d folder correct path in swat file in xinetd.d folder nothing seams to work im still getting the: 400 Server Error chdir failed - the server is not configured correctly error. when i do "ps ax | grep swat" its dosent show up but when i do a nmap scan of my computer it says port 901 is open |
I had this problem under 10.2. The way I solved it was to install the Mac OS X Developer tools for 10.2. Apparently not all the required files are installed for SWAT. Installing the Developer Tools seems to put the required files in the required places.
Not sure if this is accurate, but I think you'll find that it'll make SWAT work. Go to http://developer.apple.com (I think) to find the Developer Tools. |
Not working on 10.2.8
I'm trying to get SWAT running on Mac OS X 10.2.8 but no luck so far.
Tried the hints posted above. When I do a 'ps -ax | grep swat' it shows up. I configured the '/etc/inetd.conf' file and added this line: swat stream tcp nowait.400 root /usr/local/samba/bin/swat swat I created the file '/etc/xinetd.d/swat' and inserted: service swat { port = 901 socket_type = stream wait = no only_from = localhost groups = yes user = root server = /usr/sbin/swat log_on_failure += USERID disable = No } And added this to '/etc/services': swat 901/tcp Did al 'sudo kill -HUP' on inetd, but still I get a 404 error in my browser. |
Re: Not working on 10.2.8
Quote:
|
Connecting to SWAT:
http://localhost:901/ Safari gave na error: "Could not open the page" Could not open the page “http://localhost:901/” because Safari could not load any data for this location. The normal 404 error. |
Quote:
If you open Terminal and issue the command telnet localhost 901, do you get a connection refused or does it sit there waiting? |
Nope Connection refused:
Code:
[Mm4:~] mm4% telnet localhost 901 |
|
Nope, same error...
|
Okay... first off, reading back through, it looks like you have swat enabled in both inetd and xinetd. My first suggestion is to completely disable inetd by commenting out its entry in /System/Library/StartupItems/IPServices/IPServices, then restarting your machine. This will ensure that only xinetd is vying for the port in question.
Now, two things. 1) Make sure you have the DevTools installed. For some reason, I've seen all kinds of issues with swat if they are not installed. Might have something to do with a supporting library. 2) To make swat work on Panther, I had to add an entry to /etc/services that basically contains: Code:
swat 901/tcpJan 22 10:42:54 localhost xinetd[316]: START: swat pid=4741 from=127.0.0.1 One last thing... do you have the root account enabled? If not, enable it. swat tries to authenticate as root. If the root account is disabled, that might cause issues. |
Quote:
Code:
$ ps -auxww | grep [x]inetdYou can see what ports are being listened on with: Code:
$ netstat -na | grep LISTEN |
Quote:
sudo lsof -i :901 |
SWAT is running and I'm accessing it in Safari. Like 'jdera' wrote:
Comment the 'inetd' line in this file and reboot: '/System/Library/StartupItems/IPServices/IPServices' Though I already tried some of the other suggestions before this one, putting 'swat 901/tcp' in the '/etc/services' file etc. This was the final piece of the SWAT puzzle... Even learned some new Unix things along the way, thanx for the help guys!! |
| All times are GMT -5. The time now is 06:13 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.