1 - smb.conf
$ testparm /etc/smb.conf
2 - connection: ping
$ ping mfhk-riverliu
If return ‘host not found’ or a similar message,
then your DNS software or /etc/hosts file is not
correctly set up.
Elseif other ping errors, go to check 3 - the firewall.
C:\> ping test-samba
$ hostname
$ hostname -a
$ hostname -f
3 - firewall
$ iptables -L -v
$ ipchains -L -v
4 - List shares from Samba server
$ smbclient -L test-samba
If you get an error message containing the string ‘bad password’,
then you probably have either an incorrect hosts allow, hosts deny,
or valid users line in your smb.conf, or your guest account is not
valid. Check what your guest account is using testparm and temporarily
remove any incorrect hosts allow, hosts deny,
or valid users lines.
If you get a message connection refused response, then the
smbd server may not be running. If you installed it in inetd.conf,
then you probably edited that file incorrectly. If you installed it
as a daemon, then check that it is running and check that the netbios-ssn
port is in a LISTEN state using netstat -a.
Note: Some UNIX/Linux systems use xinetd in place of inetd.
Check your system documentation for the location of the control
files for your particular system implementation of the network
super daemon.
...
5 - Return IP of Samba server
$ nmblookup -B test-samba __SAMBA__
6 - Return IP of Samba client
$ nmblookup -B mfhk-riverliu "*"
7 - Query boardcast
$ nmblookup -d 2 "*"
8 - Enter share
$ smbclient //test-samba/share-name
9 - net view
C:\> net view \\test-samba
10 - net use
C:\> net use \\test-samba\share-name
11 - Return IP of master browser of workgroup
$ nmblookup -M workgroup-name