Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Samba Configuration
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Fred Krogh
Veteran
Veteran


Joined: 07 Feb 2005
Posts: 1008
Location: Tujunga, CA

PostPosted: Mon Oct 01, 2018 5:16 pm    Post subject: Samba Configuration Reply with quote

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
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3485
Location: Dallas area

PostPosted: Mon Oct 01, 2018 5:28 pm    Post subject: Reply with quote

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.
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 7.3.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Fred Krogh
Veteran
Veteran


Joined: 07 Feb 2005
Posts: 1008
Location: Tujunga, CA

PostPosted: Mon Oct 01, 2018 9:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3485
Location: Dallas area

PostPosted: Mon Oct 01, 2018 10:02 pm    Post subject: Reply with quote

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.
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 7.3.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Fred Krogh
Veteran
Veteran


Joined: 07 Feb 2005
Posts: 1008
Location: Tujunga, CA

PostPosted: Mon Oct 01, 2018 10:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3485
Location: Dallas area

PostPosted: Mon Oct 01, 2018 10:24 pm    Post subject: Reply with quote

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
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 7.3.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Fred Krogh
Veteran
Veteran


Joined: 07 Feb 2005
Posts: 1008
Location: Tujunga, CA

PostPosted: Tue Oct 02, 2018 12:15 am    Post subject: Reply with quote

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
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3485
Location: Dallas area

PostPosted: Tue Oct 02, 2018 12:18 am    Post subject: Reply with quote

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.
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 7.3.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1561
Location: United Kingdom

PostPosted: Tue Oct 02, 2018 1:46 pm    Post subject: Reply with quote

If you're using Windows 10, perhaps your problem is because of the following:

Quote:
Microsoft removed the Homegroup functionality from Windows 10 version 1803; the issue, however, may affect non-Homegroup PCs and PCs that used the Homegroup functionality that Windows provided.

Usually, you should be able to access devices in the network through their IP address or name, but this may not work properly anymore in Windows 10 version 1803.

Ref. https://www.ghacks.net/2018/04/17/fix-pcs-no-longer-recognized-in-network-after-windows-10-version-1803-upgrade/

The fix given in that article may help you.


Another possibility mentioned in the above article is the following:

Quote:
Microsoft disabled the application-layer network protocol Server Message Block 1.0 in the Fall Creators Update.

The modification to Windows 10 given in the following article might also help if that is the cause:

https://www.amixa.com/blog/2017/12/04/cannot-browse-network-neighborhood-under-windows-10-fall-creators-update-1709-and-newer/
_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Fred Krogh
Veteran
Veteran


Joined: 07 Feb 2005
Posts: 1008
Location: Tujunga, CA

PostPosted: Tue Oct 02, 2018 4:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 620
Location: Yeovil, Somerset, UK

PostPosted: Fri Oct 05, 2018 10:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
Fred Krogh
Veteran
Veteran


Joined: 07 Feb 2005
Posts: 1008
Location: Tujunga, CA

PostPosted: Sat Oct 06, 2018 1:01 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum