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
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

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

  




 

 

Using Samba
Prev Home Next

9.2.5.2 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:


server% 

smbclient -L localhost -U% 
Server time is Wed May 27 17:57:40 1998 Timezone is UTC-4.0
Server=[localhost] 
User=[davecb] 
Workgroup=[EXAMPLE] 
Domain=[EXAMPLE]
	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 9.2.5.3, 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 9.2.2.2") 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 9.2.4.5, 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 9.2.4.5") and correct any unintended prohibitions.

Using Samba
Prev Home Next

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