Ironically, the easiest way to test that the
smbd server is actually working is to send it a meaningless message and see if it rejects it. Try something like the following:
echo hello | telnet localhost 139
This sends an erroneous but harmless message to
smbd. The
hello
message is important. Don't try telneting to the port and typing just anything; you'll probably just hang your process.
hello
, however, is generally a harmless message.
server%
echo "hello" | telnet localhost 139
Trying
Trying 192.168.236.86 ...
Connected to localhost. Escape character is '^]'.
Connection closed by foreign host.
If you get a "Connected" message followed by a "Connection closed" message, the test was a success. You have an
smbd daemon listening on the port and rejecting improper connection messages. On the other hand, if you get "telnet: connect: Connection refused," there is probably no daemon present. Check the logs and go back to Chapter 2.
Regrettably, there isn't an easy test for
nmbd. If the
telnet
test and the
netstat
test both say that there is an
smbd running, there is a good chance that
netstat
will also be correct about
nmbd running.