Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions




Using Samba
Prev Home Next Testing locally with smbclient

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 
	---------           -----       ----------
	temp               Disk
	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, 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") 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, 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/inetd.conf and /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 valid hosts option that doesn't include the server, or an invalid hosts option that does. Recheck with the command testparm smb.conf your_hostname your_ip_address (see the section " Section") and correct any unintended prohibitions.

Using Samba
Prev Home Next

  Published under the terms of the Creative Commons License Design by Interspire