1. installation

yum -y install cups cups-lpd samba samba-client

2. configuration

vi /etc/samba/smb.conf
#
# 07feb2024: initial version (ary)

[global]
    workgroup = printers
    server string = %h (samba server %v)
    bind interfaces only = yes
    interfaces = lo eth0 tailscale0
    log level = 0
    log file = /var/log/samba/log.%m
    max log size = 50
    map to guest = bad user

    printing = cups
    load printers = no
    printcap name = /dev/null
    disable spoolss = yes

[office]
    comment = office
    printable = yes
    path = /var/spool/samba/
    guest ok = yes
    browseable = yes
    use client driver = yes
mkdir -p /var/spool/samba
chmod a+rwxt /var/spool/samba/

3. cups

systemctl start cups.service
cupsctl --remote-admin
cupsctl --remote-any
cupsctl WebInterface=yes
lpd://prt021.d01.net/PASS

./pic/print_01.png

./pic/print_02.png

./pic/print_03.png

./pic/print_04.png

./pic/print_05.png

./pic/print_06.png

./pic/print_07.png

lpstat -v
device for office: lpd://prt021/PASS

4. services

systemctl enable --now cups.service cups-lpd.socket smb.service
smbcontrol all reload-config

5. testing

smbclient -L srv003.d01.net -U%
        Sharename       Type      Comment
        ---------       ----      -------
        office          Printer   office
        IPC$            IPC       IPC Service (srv003 (samba server 4.18.6))

6. client

smb://srv003.d01.net/office

./pic/print_08.png

lpstat -v
device for Cups-PDF: cups-pdf:/
device for lexmark: smb://srv003.d01.net/office

7. references