If you didn't use SWAT to create your configuration file, you should probably test it to ensure that it is syntactically correct. It may seem silly to run a test program against an eight-line configuration file, but it's good practice for the real ones that we'll be writing later on.
The test parser,
testparm, examines an
smb.conf file for syntax errors and reports any it finds along with a list of the services enabled on your machine. An example follows; you'll notice that in our haste to get the server running we mistyped
workgroup
as
workgrp
(the output is often lengthy, so we recommend capturing the last parts with the
tee
command):
Load smb config files from smb.conf
Unknown parameter encountered: "workgrp"
Ignoring unknown parameter "workgrp"
Processing section "[test]"
Loaded services file OK.
Press enter to see a dump of your service definitions
# Global parameters
[global]
workgroup = WORKGROUP
netbios name =
netbios aliases =
server string = Samba 2.0.5a
interfaces =
bind interfaces only = No
...(content omitted)...
[test]
comment = For testing only, please
path = /export/samba/test
read only = No
guest ok = Yes
The interesting parts are at the top and bottom. The top of the output will flag any syntax errors that you may have made, and the bottom lists the services that the server thinks it should offer. A word of advice: make sure that you and the server have the same expectations.
If everything looks good, then you are ready to fire up the server daemons!