Book Image

Implementing Samba 4

By : Marcelo Leal
Book Image

Implementing Samba 4

By: Marcelo Leal

Overview of this book

Table of Contents (19 chapters)
Implementing Samba 4
Credits
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
References
Index

Sharing the printer on a Microsoft AD network using Samba


The main directive that we need to have in our Samba 4 configuration file to start configuring it as a print server is the printers share. Thus, we need to add a section to our smb.conf (for example, /usr/local/samba/etc/smb.conf) file as shown in the following code:

…
[PRINTERS]
    Comment = DEV Dep. Printers
    path = /var/spool/samba 
    Printable = yes
    Printing = CUPS

Tip

The /var/spool/samba directory should already be created, but if it is not created, we just need to create it and set the right permissions. Remember that you are required to set the sticky bit on the printing spool directory: chmod 1777 /var/spool/samba.

The preceding configuration is all we need for the Samba 4 Server to have access to our CUPS server's backend. The comment line is optional, but it is a good source of information for the clients and even system administrators. After adding the general [PRINTERS] share, we can add as many printers to our...