Samba is a free software re-implementation of the SMB/CIFS networking protocol, provides file and print services for various Windows and Linux clients and can integrate with a Windows Server domain.
In this tutorial, we learn how to setup a samba printer server on CentOS Linux.
Requirements
A computer with CentOS installed on it.
Internet Connection.
Computer with any version of windows installed on it.
Install Samba
The below commands by the order will install the service, run it and make it run in the startup
$ sudo yum install samba sudo service smb start sudo chkconfig smb on
Check that cups service is running (CUPS is currently the most widely used spool system in Unix/Linux environments) as below.
$ sudo service cups status
It should print as below:
cupsd (pid 1926) is running...
Configure Printer Server using samba
Smb.conf is the configuration file for the samba program. Now open '/etc/samba/smb.conf' any text editor and change the printers section to match below:
[Printers] comment = Printer Drivers path = /var/lib/samba/drivers browseable = yes guest ok = yes read only = no
Two main config consider changing in smb.conf file is "guest ok" set to yes and "browseable" set to yes.
Now restart the samba service
$ sudo service smb restart
The /var/lib/samba/printers' hold all the printer drivers. So you have to copy all driver files to '/var/lib/samba/printers' directory.
Access the printer from windows machine
On window client start the 'run' command and access print server either using ip address or its DNS name.
Right-click on the printer you want to install and choose connect. You will be prompted to install the driver, select the proper driver in the extracted folder and click install. Congrats, you can now print.
To help me understand this, the samba share has the printer drivers required for the windows client to configure the printer correct?
The samba server does not actually host the printer?
You need a network printer , samba will be used for sharing and cups will be used for printing.