====== Ubuntu - 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 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 failed
This could be 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.
tail /var/log/samba/log.smbd
Another error message often seen is:
session request to 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.
Check that the correct NetBIOS name was entered in the command. If that is not the cause of the error, then it could be caused by a broken nmbd installation.