The first test is to ensure the server can list its own services (shares). Run the command
smbclient with a
-L option of
localhost to connect to itself, and a
-U option of just
% to specify the guest user. You should see the following:
smbclient -L localhost -U%
Server time is Wed May 27 17:57:40 1998 Timezone is UTC-4.0
Sharename Type Comment
--------- ----- ----------
IPC$ IPC IPC Service (Samba 1.9.18)
homes Disk Home directories
This machine does not have a browse list
If you received this output, move on to the next test,
Section 22.214.171.124, Testing connections with smbclient." On the other hand, if you receive an error, check the following:
If you get "Get_hostbyname: unknown host localhost," either you've spelled its name wrong or there actually is a problem (which should have been seen back in
Section 126.96.36.199") In the latter case, move on to "Troubleshooting Name Services."
If you get "Connect error: Connection refused," the server machine was found, but it wasn't running an
nmbd daemon. Skip back to "
Section 9.2.4," and retest the daemons.
If you get the message "Your server software is being unfriendly," the initial session request packet got a garbage response from the server. The server may have crashed or started improperly. The common causes of this can be discovered by scanning the logs for:
Invalid command-line parameters to
smbd ; see the
smbd manual page.
A fatal problem with the
smb.conf file that prevents the startup of
smbd. Always check your changes, as was done in the section "
Section 188.8.131.52, Testing daemons with testparm."
The directories where Samba keeps its log and lock files are missing.
There is already a server on the port (139 for
smbd, 137 for
nmbd ), preventing it from starting.
If you're using
inetd instead of stand-alone daemons, check your
/etc/services entries against their manual pages for errors as well.
If you get a
Password: prompt, your guest account is not set up properly. The
%U option tells
smbclient to do a "null login," which requires that the guest account be present but does not require it to have any privileges.
If you get the message "SMBtconX failed. ERRSRV - ERRaccess," you aren't permitted access to the server. This normally means you have a
hosts option that doesn't include the server, or an
hosts option that does. Recheck with the command
your_ip_address (see the section "
Section 184.108.40.206") and correct any unintended prohibitions.