Troubleshooting and Testing Samba

From LinuxNewbie

Excerpt from http://info.ccone.at/INFO/Samba-2.2.12/UNIX_INSTALL.html

Test your config file with testparm

It's important that you test the validity of your smb.conf file using the testparm program. If testparm runs OK then it will list the loaded services. If not it will give an error message.

Make sure it runs OK and that the services look reasonable before proceeding.

Try listing the shares available on your server

$ smbclient -L yourhostname

You should get back a list of shares available on your server. If you don't then something is incorrectly setup. Note that this method can also be used to see what shares are available on other LanManager clients (such as WfWg).

If you choose user level security then you may find that Samba requests a password before it will list the shares. See the smbclient man page for details. (you can force it to list the shares without a password by adding the option -U% to the command line. This will not work with non-Samba servers)

Try connecting with the unix client

$ smbclient //yourhostname/aservice

Typically the yourhostname would be the name of the host where you installed smbd. The service is any service you have defined in the smb.conf file. Try your user name if you just have a [homes] section in smb.conf.

For example if your unix host is bambi and your login name is fred you would type:

$ smbclient //bambi/fred