Click here to view code image
[printers]
comment = Ubuntu Printers
browseable = no
printable = yes
path = /var/spool/samba
/var/spool/samba is a spool path set just for Samba printing.
Testing Samba with the testparm Command
After you have created your /etc/smb.conf file, you can check it for
correctness by using the testparm command. This command parses
through your /etc/smb.conf file and checks for any syntax errors. If
none are found, your configuration file will probably work correctly. It does
not, however, guarantee that the services specified in the file will work; it is
merely making sure that the file is correctly written.
As with all configuration files, if you are modifying an existing, working file,
it is always prudent to copy the working file to a different location and
modify that file. Then you can check the file with the testparm utility. The
command syntax is as follows:
Click here to view code image
matthew@seymour:~$ sudo testparm /path/to/smb.conf.back-up
Load smb config files from smb.conf.back-up
Processing section "[homes]"
Processing section "[printers]"
Loaded services file OK.
This output shows that the Samba configuration file is correct, and as long as
all the services are running correctly on your Ubuntu machine, Samba should
be working correctly. Now copy your old smb.conf file to a new location,
put the new one in its place, and restart Samba with the command sudo
smbd restart. Your new or modified Samba configuration should now be
in place.
Starting, Stopping, and Restarting the smbd
Daemon
After your smb.conf file is correctly configured, you might want to start,
stop, or restart your Samba server daemon. You can do this with the
/usr/sbin/smbd command, which (with no options) starts the Samba