Samba wont start
I have been asking a lot of questions lately so im sorry but i have been trying things on my own and i have gotten them to work but i cant get samba to work.
I downloaded the binary file and compiled and installed everything successfully. i looked at some help files that i found on the internet about enabling SWAT. swat stream tcp nowait.400 root /usr/sbin/swat swat this is what the control entry might look like and this is what mine looks like. the inetd is running. But when i went to use swat i typed in http://localhost:901. and it didnt find it. if i didnt word this right or something please let me know. i am getting very angry. thanks |
Don't worry about asking questions, that is what the forum is for.
Do you have an entry in /etc/services mapping swat to port 901? ------------------ Jeremiah |
yes i opened /etc/services and it said
"swat 901/tcp # samba web configuration tool' |
I am just a newbie trying to help, but,
you are sure that the program is set to localhost and not to some other protocol like eth0? And also, that there is no firewall preventing access? What often is the case (for me) when a program doesn't work is that I've been misconfiguring the config-files in some way but I can't help you with SWAT. Does this make any sense to you? |
run the command "chkconfig swat --list" and post the output.
<edit> Just realized I don't know if you are running RH or not. The command above works on RH, not sure if it works elsewhere as I am not running anything else right now. |
where would i check to see if it is set to localhost?
|
does jdc's suggestion apply? otherwise,
if you type "netstat -l " (that is an l as in linux) do you get a line like this? tcp 0 0 *:swat *:* LISTEN |
hi, i have the same problem, but there is no swat listing in /etc /sevices
where am I supposed to put that line? "swat 901/tcp # samba web configuration tool' Also, i DONT get this tcp 0 0 *:swat *:* LISTEN in netstat |
Tyir,
If you don't have that piece in your /etc/services file, then you won't get the output from netstat. Put that "swat 901/tcp # sam...." piece anywhere in that file. It is easier to keep track of if you put it in numerical order, but it is not necessary. |
Tyir:
Read the manual : "man swat" / alm |
I already had the file for the Xinetd installtion
/etc/xinetd.d/swat |
no i didnt get the "tcp 0 0 swat listen
I am running Slackware9.1 |
Tyir:
If your computer is like mine, edit that file so that the last line reads disabled = no Then kill the xinetd (i needed to start it up manually again aswell with "xinetd") |
this is what the output of netstat -l
garrett@garrett:~$ netstat -l Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 *:time *:* LISTEN tcp 0 0 *:submission *:* LISTEN tcp 0 0 *:finger *:* LISTEN tcp 0 0 *:x11 *:* LISTEN tcp 0 0 *:auth *:* LISTEN tcp 0 0 *:ftp *:* LISTEN tcp 0 0 *:ssh *:* LISTEN tcp 0 0 *:631 *:* LISTEN tcp 0 0 *:smtp *:* LISTEN udp 0 0 *:biff *:* udp 0 0 *:biff *:* udp 0 0 *:ntalk *:* udp 0 0 *:ntalk *:* udp 0 0 *:time *:* udp 0 0 *:time *:* udp 13124 0 *:bootpc *:* udp 0 0 *:32852 *:* udp 0 0 *:631 *:* Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node Path unix 2 [ ACC ] STREAM LISTENING 6590 /tmp/ksocket-garrett/kd einit-:0 unix 2 [ ACC ] STREAM LISTENING 6620 /tmp/ksocket-garrett/kl aunchert9oSla.slave-socket unix 2 [ ACC ] STREAM LISTENING 7131 /tmp/ksocket-garrett/kd esud_:0 unix 2 [ ACC ] STREAM LISTENING 6594 /tmp/.ICE-unix/dcop2429 -1065980458 unix 2 [ ACC ] STREAM LISTENING 6727 /tmp/.ICE-unix/2452 unix 2 [ ACC ] STREAM LISTENING 6563 /tmp/.X11-unix/X0 unix 2 [ ACC ] STREAM LISTENING 6687 /tmp/mcop-garrett/garre tt_home-098f-3f89922b unix 2 [ ACC ] STREAM LISTENING 1112 /dev/gpmctl |
garr0323:
You DID restart inetd, right? If swat was running there would've been a line in the output with swat in it... My guess is either (1) the line containing the configuration of swat in inetd.conf is wrong (2) you didn't kill off inetd properly (3) you didn't install it correctly (check /usr/sbin/swat). |
alm thank you!
i had already killed xinetd, but i had to restart it ;) |
when you run "ps -ef | grep inetd" do you get inetd or xinetd? they are configured totally different.
what file did you put the stanza "swat stream tcp nowait.400 root /usr/sbin/swat swat" in, /etc/inetd.conf or /etc/xinetd.d/swat if you are running xinetd and you edited /etc/inetd.conf, then that could explain things. |
how would i restart inetd?
|
type "killall -HUP inetd" then "inetd" but do as jdc2048 suggests first.
since you need to know whether you are running inetd or xinetd |
-alm-
i checked /usr/sbin/swat the file wont execute. and when i click on inetd it says that there isnt a program. but when i instlaled samba it said that everything was fine |
Is swat still a separate package?
How did you install the package? (i.e. did you compile from source, or did you install an rpm) and is there some reason you don't answer any questions I ask? |
Not sure what the problem is.
Try typing, as root: "whereis swat" to see if it might have been put some other place. |
sorry jdc, i installed it as source. after i finshed doing the makeinstall of samba, it gave me a message that said swat files installed correctly
|
Forgot to ask what version you are using, I assume that you probably dl'd the latest (3.0 ?)
Was there an option listed for making the swat, for instance "--with-swat" <edit> sorry for the extra questions. I am trying to download it to look at the options for turning on swat. |
i am using the latest version 3.0
i dont recall seeing any options |
-alm-
swat is in /usr/sbin/swat |
I see the "--with-swatdir=<dir>" option, did you use that?
Can you do an "ls -l /usr/sbin/swat" and determine if it is executable? Did you ever see if you are running xinetd or inetd? |
ok the --with-swatdir=<dir> where did you see that? when you were configure or compiling?
I am running inetd this is what it gave me when i ran ls -l /usr/sbin/swat -rwxr-xr-x 1 root bin 957780 Apr 7 2003 /usr/sbin/swat* |
If I type "/usr/sbin/swat" on my computer, the program starts but nothing is outputted on the screen, and I have to stop the program manually with CTRL-C.
Is this what happens when you run the program? Or do you get an error message? |
-alm-
yea this is what happened when i typed /usr/sbin/swat no output no error message |
I think then something is wrong with your inetd.conf
Or you haven't done as suggested and restarted inetd? Alternatively, you could notify us whether you can access other network-services such as ftp, ssh, telnet, http , so we'll know there is no network problem |
-alm-
I have restarted and killed inetd tons of times. i dont know what could be wrong with my inetd.conf file. i used mandrake 9.1 before and that pretty much set everything up for me. but this is very frustrating. I am on the internet so i would think that it cant be a network problem |
i can use ftp
|
You won't get any output from the command line, that is normal.
What you need to do is, run "ps -ef | grep swat | grep -v grep", and look for the swat program running. The open a browser and navigate to the localhost:901 page and then run the ps command above again and see if it is there. If not, then there is a problem with inetd running the program or you have a firewall blocking that port. You may want to run iptables or ipchains to see what is set up on your system. If it is running and you are getting nothing on your browser, then there is probably a problem with the swat program itself. <edit> after looking back, I believe the option you would have had to run would have been "--enable-swat", The "--with-swatdir" will default to a previously specified value. But you would have had to do the "--enable-swat" option in order to get this. |
there is nothing when i type ps -ef | grep swat | grep -v grep
when i typed in iptables i have no idea what all that means because i am pretty new to all this. i am pretty sufre that i dont have a firewall up |
You could try and see if you can use any other inetd service. Did you try to ftp to your own machine (ftp localhost)? In case ftp is not an inetd service, try to telnet to your own machine. If that doesn't work, see if telnet is enabled in inetd.conf; and if it isn't, enabled it, restart inetd, and try to telnet again.
I hope this made sense. |
when i tried telnet to my own machine it read this
telnet> open (to) localhost Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused |
If you are getting a bunch of output from iptables, then you probably do have a firewall set up. I know redhat gives you an option during install that will ask you if you want a firewall set up, the default is medium security settings, which pretty much only allows outbound connections to occur.
the fact that you are being refused connection also leans this way. as root run, "iptables -L", and then post results. X out any identifiable IP's (i.e. 192.168.0.1 becomes xxx.xxx.x.x or <my IP>) |
I GOT IT!!!!!!!!
i went into the inetd.conf and relized that the #'s meant that the code was commented out. so i deleted the # next to the swat tcp/901 and restarted inetd and it worked. thanks a lot to everyone who helped me out. im sure i will have more questions along the way. thanks |
no problem! congratulations!
|
All times are GMT -5. The time now is 01:52 PM. |