Bug 2216813

Summary: Samba don't shared printer by documentation Fedora
Product: [Fedora] Fedora Reporter: Mike <mixask8>
Component: sambaAssignee: Guenther Deschner <gdeschner>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: abokovoy, aboscatt, anoopcs, asn, gdeschner, jstephen, lmohanty, pfilipen, sbose, ssorce
Target Milestone: ---Keywords: Documentation, Question, Reopened, WorkAround
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-04 12:15:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
samba config
none
cups config
none
samba 2 config
none
cups 2 config none

Description Mike 2023-06-22 18:13:09 UTC
Hello. I have old printer Xerox Phaser 3140 (https://bugzilla.redhat.com/show_bug.cgi?id=2012698)
It's work fine on local machine by usb. I want make printer a shared in local network.
Used samba by documentation: https://docs.fedoraproject.org/en-US/fedora/latest/system-administrators-guide/servers/File_and_Print_Servers/#sect-Samba_with_CUPS_Printing_Support
It turned out to be very non-trivial.


Reproducible: Always

Steps to Reproduce:
My enviornment:
1. Printer Xerox
2. Laptop (Fedora Workstation 38)
3. miniPC (Fedora Server 38)

Steps on miniPC:
1. I connect printer to miniPC. 
2. On miniPC disabled:
- firewall
- SELinux
3. Install cups(splix) on miniPC
4. Printer added to CUPS and printing test page.
5. Settings samba according to the documentation
6. Very important step that is not described in the documentation:
CUPS must have:
Browsing Yes
Port 631
Reference:
* https://gist.github.com/leafstorm/b2e91b9c9b66c82732e3d483fd90aa9f
* https://www.zdnet.com/article/how-to-share-a-printer-on-linux-with-cups-and-samba/

Steps on laptop:
1. Open Settings -> Printers
2. Try add printers

Actual Results:  
Printer not showing after scaning if i even try to enter ip miniPC

Expected Results:  
Printer should be appears after scaning for adding.

Workaround:
If add additional a section describe my printer - it's available via sharing, but if only if enter ip addresses miniPC

My section:
[Xerox]
        comment = Xerox 3140
        printer = Xerox_3140_net
        path = /var/tmp
        printing = cups
        printable = yes
        guest ok = yes
        writable = no
                       
Very important: field printer must have real name printer like as in cups
reference: https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Print_Server#Manual_Sharing_of_Printers

Comment 1 Mike 2023-06-22 18:16:30 UTC
Created attachment 1972134 [details]
samba config

Section home and tmp created for testing working samba

Comment 2 Mike 2023-06-22 18:21:15 UTC
Created attachment 1972136 [details]
cups config

Comment 3 Andreas Schneider 2023-06-27 12:07:55 UTC
I think it is better to take a look at the RHEL documentation. The Fedora one is out of date and we are investigating if we could sync it with the RHEL one.

Here is the link:

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/configuring_and_using_network_file_services/assembly_using-samba-as-a-server_configuring-and-using-network-file-services#assembly_setting-up-samba-as-a-print-server_assembly_using-samba-as-a-server

Does that help?

Comment 4 Andre Boscatto 2023-07-04 12:15:49 UTC
Documentation has been updated, please check https://docs.fedoraproject.org/en-US/fedora/latest/system-administrators-guide/servers/File_and_Print_Servers/

Comment 5 Mike 2023-07-07 07:49:17 UTC
I read RHEL documantation. I don't understand what changes on Fedora docs (have old screenshot - section Printer Configuration)
On Fedora Server config smb the out of box have all settings.

Printer is sharing, but gnome observer don't find printer until then ip address entry.
I successfully added printer without manually configure in smb, but i can't printed. In queue created job with message - SpliX Cannot open job.

I hide section print$ and set `use client driver` for printer. But nothing sense. On laptop driver have.

I have same issue when i try printed via ipp, but after change drivers on ipp evertwhere all works fine (it's will be on another machine), but this case i have corrected drivers.
Even manual sharing didn't help

Comment 6 Andre Boscatto 2023-07-11 12:04:36 UTC
Hi Mike,

Thanks for getting back. Can you please elaborate further? It is quite hard to follow your previous message.

In summary, what is the issue, what have you done and the current status? Did you allow samba browsing in the firewall rules?

Kind regards

Comment 7 Mike 2023-07-13 17:21:17 UTC
I installed Fedora Server 38 on my miniPC
Installed CUPS, Splix (needed for my printer), SAMBA.
Entered to cockpit and disable firewall and SELinux - easy way.
SAMBA settings have all needed settings out of the box. I just change workgroup.
In CUPS i don't changes anything.

Now if i try added my printer my laptop where stay Fedora Workstation 38 i can find my printer if i enter ip-address my miniPC in gnome printer observer.
Printer added fine, but now if i try send to print i have error on CUPS in queue - SpliX Cannot open job.

In previous my approach my printer needed shared to manually in samba but print working. Now if i does set manually sharing in SAMBA printing too don't working. May be something in CUPS?

My new current config in attachment.

Comment 8 Mike 2023-07-13 17:24:16 UTC
Created attachment 1975634 [details]
samba 2 config

Comment 9 Mike 2023-07-13 17:25:00 UTC
Created attachment 1975635 [details]
cups 2 config

Comment 10 Andreas Schneider 2023-07-19 08:52:32 UTC
What you describe in comment #7 seems to be an unrelated issue to the documentation. I would suggest to open a new bug for this.

Please provide log level 10 logs reproducing the issue, see:

https://hackmd.io/@asn/SkHk8rXBz