View previous topic :: View next topic |
Author |
Message |
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Mon Oct 01, 2018 5:16 pm Post subject: Samba Configuration |
|
|
I'd like to able to print to a printer attached to a Linux machine from a windows machine. I'm having trouble seeing just what should be in the configuration files. The various howto's are slightly different and some of things I've tried have even kept samba from starting. The printer in question is a Samsung M2625D Series (With Duplexer). So I'm giving a minimal configuration file here the hopes someone will help to fill in what is missing. Any additional discussion on what has to be done on the windows (1) end would also be most welcome. Many Thanks,
Fred
Code: | [global]
security = user
os level = 20
printer = Sam
workgroup = crowsnest
path = /var/spool/samba
dns proxy = no
socket options = TCP_NODELAY
remote announce = 192.168.1.11 192.168.1.2
max log size = 10
log file = /var/log/samba/log.%m
printcap name = /etc/printcap
default = printers
hosts allow = 192.168.1. 127.
printing = cups
load printers = yes
netbios name = mon1
[homes]
comment = Home Directories
browseable = no
writable = yes
[printers]
comment = All Printers
path = /var/lib/samba
browseable = yes
guest ok = yes
writable = no
printable = yes
|
|
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6095 Location: Dallas area
|
Posted: Mon Oct 01, 2018 5:28 pm Post subject: |
|
|
This is from the default smb.conf file
Code: | # NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = yes
writable = no
printable = yes |
Whatever path that you use should be world writable with sticky bit set
Code: | drwxrwxrwt 1 root root 40 Jun 1 10:40 /var/spool/samba/ |
From the windows side, it should see a share named "printers"
Edit to add: "man smb.conf" talks a little about printers. _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Mon Oct 01, 2018 9:31 pm Post subject: |
|
|
Thanks for the suggestions which I have followed. But I see no way to get to the printer on the windows side. I suspect the problem has to do with the windows side (which I really don't know very well), but of course I can't say for sure that the problem is not on the linux side. Ideas very welcome. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6095 Location: Dallas area
|
Posted: Mon Oct 01, 2018 10:02 pm Post subject: |
|
|
what is your max_protocol set in smb.conf?
Mine
Code: | max protocol = SMB2 |
Windows 7 doesn't have a problem seeing my hard drive shares, I use a network printer, so I can't help on that. _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Mon Oct 01, 2018 10:18 pm Post subject: |
|
|
I didn't have anything set for max protocol, just added as per your suggestion. Windows still does not see the printer, although that may be because I don't know how to tell it to look. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6095 Location: Dallas area
|
Posted: Mon Oct 01, 2018 10:24 pm Post subject: |
|
|
Not sure what version of windows you're using.
Under Win7, if I go to control panel and select devices and printers it shows my network printer (under printers and faxes)
Also if you change things in the smb.conf file you need to stop and restart the samba service "/etc/init.d/samba restart" as root _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Tue Oct 02, 2018 12:15 am Post subject: |
|
|
I'm interfacing with Windows 10. And of course restart samba when changing smb.conf. Windows doesn't see any printers on the network. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6095 Location: Dallas area
|
Posted: Tue Oct 02, 2018 12:18 am Post subject: |
|
|
Not sure how you have win10 set up, but if you're using workgroups it needs to be in the same one as samba usually "WORKGROUP"
If you've set up homegroups then I'm not sure how you find the printer.
Probably take some googling to figure it out, start with googling "samba win10 printer" and see there's some helpful hints. _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
|
Back to top |
|
|
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Tue Oct 02, 2018 4:38 pm Post subject: |
|
|
Many thanks for the suggestions. It has got me a bit further before reversing direction. There are three machines that could be listed: hplt (laptop I'm trying to get print working on), mon1 (the machine running samba, and amv (another windows 10 machine on the network. "network" in the file manager in hplt can show: hplt, or hplt, amv, mon1, or hplt, hplt, amv, mon1. At the moment it just shows hplt. When it did show mon1, it couldn't access it. When it showed amv, I got foiled by a bad password. I'm not seeing any pattern in what happens. Sometimes a reboot changes things sometimes it doesn't. It seem that windows is a lot more "fun" than linux. You have so many ways to see it do strange things. Of course my current problems could be in samba. Just for giggles this is what is currently not working. Code: | # testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
# Global parameters
[global]
default service = printers
dns proxy = No
log file = /var/log/samba/log.%m
max log size = 10
printcap name = /etc/printcap
remote announce = 192.168.1.11 192.168.1.2 192.168.1.4
security = USER
server max protocol = SMB2
workgroup = CROWSNEST
idmap config * : backend = tdb
hosts allow = 192.168.1. 127.
path = /var/spool/samba
printer name = Sam
[homes]
browseable = No
comment = Home Directories
read only = No
[printers]
browseable = No
comment = All Printers
guest ok = Yes
printable = Yes
|
|
|
Back to top |
|
|
gerdesj l33t
Joined: 29 Sep 2005 Posts: 621 Location: Yeovil, Somerset, UK
|
Posted: Fri Oct 05, 2018 10:15 pm Post subject: |
|
|
That's quite a full on smb.conf. I suggest that you remove all those remote announce, host allow and protocol max related things (for example Win 10 will try to do SMB 3 by default). Get rid of default service as well ... keep things simple.
Now look at your printing system on its own - CUPS. Windows can happily print to IPP printers for example without invoking Samba. CUPS by default will advertise attached printers to the local LAN. You also happen to have a full on traditional Unix printing system provided by CUPS. Again Windows can print to that. You only really *need* Samba for things like delivering printer drivers to Windows clients.
Start by becoming a CUPS expert and then worry about Samba ...
Cheers
Jon |
|
Back to top |
|
|
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Sat Oct 06, 2018 1:01 am Post subject: |
|
|
I've tried your suggestions, and also tried without samba running. I have no idea whether the problem is at the linux end or the windows end. On the chance that it might mean something to someone ... Code: | # netstat -tupln|grep 631
tcp 0 0 0.0.0.0:631 0.0.0.0:* LISTEN 36678/cupsd
tcp6 0 0 :::631 :::* LISTEN 36678/cupsd |
[Moderator edit: changed [quote] tags to [code] tags to preserve output layout. -Hu] |
|
Back to top |
|
|
|