|
Sams Teach Yourself Samba in 24 Hours |
||||||||||||||||||||||||||
|
Hour 4: Installing and Testing the Configuration |
||||||||||||||||||||||||||
|
I assume that the binaries you have are compiled correctly using the default locations. The next step is to verify that there are no syntax errors in smb.conf. If you installed all the Samba utilities (which is what happens when you type make install), you should find a tool named testparm in the /usr/local//samba/bin/ directory. The utility checks smb.conf and prints out all the default values which were not overridden. It can be very helpful to make sure Samba is seeing what you think it should see.
I purposely misspelled netbios in the [global] section of the following smb.conf file.
; smb.conf's global parameters section
[global]
; set the netbios machine name for the server
netbis name = EAGLE
; set the workgroup membership
workgroup = FOWLPLAY
; set Samba to authenticate in user mode security
security = user
printing = bsd
I then ran it through the testparm tool. If you want testparm to examine an smb.conf file located somewhere other than the compile default, you can use the -s filename switch:
root# /usr/local/samba/bin/testparm -s smb.conf | head -6 Load smb config files from smb.conf Unknown parameter encountered: "netbis name" Ignoring unknown parameter "netbis name" Processing section "[boss1]" Processing section "[homes]" Processing section "[printer1]"
You'll notice that the output reports an unknown parameter: netbis name.
Another useful means of using testparm is to determine the default values of parameters. For example, the following output indicates that the default guest account is nobody.
root# /usr/local/samba/bin/testparm -s smb.conf | grep "guest account"
guest account = nobody
|
Sams Teach Yourself Samba in 24 Hours |
||||||||||||||||||||||||||
|
Hour 4: Installing and Testing the Configuration |
||||||||||||||||||||||||||
|
© Copyright Macmillan USA. All rights reserved.