This is an old revision of the document!
Table of Contents
Samba - Check Samba is running
Check the Samba Server is running
ps -ef | grep smbd
Result:
root 3380 1 0 Jun30 ? 00:00:01 /usr/sbin/smbd -D root 3381 3380 0 Jun30 ? 00:00:04 /usr/sbin/smbd -D root 3383 3380 0 Jun30 ? 00:00:01 /usr/sbin/smbd -D root 5978 3380 0 Jul08 ? 00:00:00 /usr/sbin/smbd -D root 5980 3380 0 Jul08 ? 00:00:00 /usr/sbin/smbd -D root 5982 3380 0 Jul08 ? 00:00:00 /usr/sbin/smbd -D root 88308 87793 0 09:49 pts/0 00:00:00 grep --color=auto smbd
???
ps -ef | grep nmbd
Result:
root 3352 1 0 Jun30 ? 00:00:20 /usr/sbin/nmbd -D root 88339 87793 0 09:54 pts/0 00:00:00 grep --color=auto nmbd
Check the Samba Client is running
smbclient -L ShareWiz -N
- -L <server> option instructs smbclient to list the available resources on the server.
- -N flag (anonymous login) is used to temporarily avoid any potential problems with authentication.
This step should be executed while logged on to the Samba server locally (that is, not from another Unix host on the network).
Result:
WARNING: The "syslog" option is deprecated Domain=[SHAREWIZ] OS=[Windows 6.1] Server=[Samba 4.3.9-Ubuntu] Sharename Type Comment --------- ---- ------- print$ Disk Printer Drivers open Disk ShareWiz File Server Open share Disk ShareWiz File Server Share secureshare Disk ShareWiz File Server Secure Share IPC$ IPC IPC Service (server1 server (Samba, Ubuntu)) Domain=[SHAREWIZ] OS=[Windows 6.1] Server=[Samba 4.3.9-Ubuntu] Server Comment --------- ------- SERVER1 server1 server (Samba, Ubuntu) Workgroup Master --------- ------- SHAREWIZ SERVER1
An error message may be displayed instead:
error connecting to 192.168.1.2:139 (Connection refused) Connection to <server> failed
is caused by smbd not running or not being able to bind to port 139. An inability to bind to the correct port can be caused by configuring smbd to start from [x]inetd (possibly left over from a previous Samba installation) and then attempting to launch the server as a daemon. The most common means of correcting this is to ensure that smbd can actually start. Because smbd does not print error messages to the console window, it is a good idea to view the last few lines of the associated log file.
The second error message often seen by administrators is
session request to <server> failed (Not listening for calling name)
When connecting locally using smbclient, this error is almost always a result of a misconfigured hosts allow or hosts deny parameter in smb.conf. The server is running by rejecting the NetBIOS session setup.
From the description of the NetBIOS Name Service, it sounds like we used the wrong NetBIOS name when connecting to the server. However, this is not the case here. This error cannot be caused by a broken nmbd installation because nmbd does not even have to be running currently.