You are not logged in.

#1 2023-05-28 06:15:06

sgolding81
Member
From: Australia
Registered: 2023-05-28
Posts: 8

Unable to browse network or setup network printer

I am having issues with networking that seem to be connected however I am unable to get working correctly. My main concern is trying to setup my Brother IPP Everywhere printer in cups, though it is not being detected. I can access samba shares on my other computers fine, however I am unable to open the Windows Network folder in Gnome Files as it states it 'Failed to retrieve share list from server: No such file or directory'.

Also, when I ping my other devices on the network using the hostname, each ping takes a long time to return though is ultimately successful. When I ping using the IP address, ping acts as expected. I am using a fritz box which is adding the domain .fritz.box to all my devices on the hostname, so am not sure if that is related also.

I've checked firewall rules, and everything seems OK there. I feel that the issues are connected, and just need some guidance. Happy to provide more info, just not sure what to post.

Any help would be appreciated.

Offline

#2 2023-05-28 09:56:43

jonno2002
Member
Registered: 2016-11-21
Posts: 868

Re: Unable to browse network or setup network printer

https://wiki.archlinux.org/title/CUPS#Network

To discover, make use of discovered or share printers using DNS-SD/mDNS, setup .local hostname resolution with Avahi and restart cups.service.
Note: DNS-SD is only supported when using Avahi. CUPS does not support using systemd-resolved for DNS-SD, see CUPS issue 5452.

To share printers with Samba, e.g. if the system is to be a print server for Windows clients, the samba package will be required.

you need to install and enable avahi: https://wiki.archlinux.org/title/Avahi

and for the gnome files thing try installing 'gvfs-smb' if you havent already
https://wiki.archlinux.org/title/Samba# … nd_PCManFM

In order to access samba shares through GNOME Files, Nemo, Caja, Thunar or PCManFM, install the gvfs-smb package.

Offline

#3 2023-05-28 10:12:49

sgolding81
Member
From: Australia
Registered: 2023-05-28
Posts: 8

Re: Unable to browse network or setup network printer

Avahi and gvfs-smb are installed and seem to be working, though am not sure avahi is configured correctly.

avahi-daemon.conf:

# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# avahi is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with avahi; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.

# See avahi-daemon.conf(5) for more information on this configuration
# file!

[server]
#host-name=foo
#domain-name=local
browse-domains=fritz.box
use-ipv4=yes
use-ipv6=yes
allow-interfaces=enp4s0,lo,wlp5s0
#deny-interfaces=eth1
#check-response-ttl=no
#use-iff-running=no
#enable-dbus=yes
#disallow-other-stacks=no
#allow-point-to-point=no
#cache-entries-max=4096
#clients-max=4096
#objects-per-client-max=1024
#entries-per-entry-group-max=32
ratelimit-interval-usec=1000000
ratelimit-burst=1000

[wide-area]
enable-wide-area=no

[publish]
#disable-publishing=no
#disable-user-service-publishing=no
#add-service-cookie=no
#publish-addresses=yes
publish-hinfo=no
publish-workstation=no
#publish-domain=yes
#publish-dns-servers=192.168.50.1, 192.168.50.2
#publish-resolv-conf-dns-servers=yes
#publish-aaaa-on-ipv4=yes
#publish-a-on-ipv6=no

[reflector]
#enable-reflector=no
#reflect-ipv=no
#reflect-filters=_airplay._tcp.local,_raop._tcp.local

[rlimits]
#rlimit-as=
#rlimit-core=0
#rlimit-data=8388608
#rlimit-fsize=0
#rlimit-nofile=768
#rlimit-stack=8388608
#rlimit-nproc=3

When I run avahi-autoipd -D it returns

Missing interface name.

nsswitch.conf:

# Name Service Switch configuration file.
# See nsswitch.conf(5) for details.

passwd: files systemd
group: files [SUCCESS=merge] systemd
shadow: files systemd
gshadow: files systemd

publickey: files

hosts: mymachines mdns [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns wins
networks: files

protocols: files
services: files
ethers: files
rpc: files

netgroup: files

I'm not really interested in hosting samba shares at this stage, just wanting to access. smb.conf:

# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# For a step to step guide on installing, configuring and using samba,
# read the Samba-HOWTO-Collection. This may be obtained from:
#  [url]http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf[/url]
#
# Many working examples of smb.conf files can be found in the
# Samba-Guide which is generated daily and can be downloaded from:
#  [url]http://www.samba.org/samba/docs/Samba-Guide.pdf[/url]
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
   workgroup = WORKGROUP
   domain master = auto  

# server string is the equivalent of the NT Description field
   server string = Arch Samba Server

# Server role. Defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller".
#
# Most people will want "standalone server" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.
   server role = standalone server

  client min protocol = NT1

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
#   hosts allow = 192.168.178. 127.

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
;  guest account = pcguest

# this tells Samba to use a separate log file for each machine
# that connects
   log file = /usr/local/samba/var/log.%m

# Put a capping on the size of the log files (in Kb).
   max log size = 50

# Specifies the Kerberos or Active Directory realm the host is part of
;   realm = MY_REALM

# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
;   passdb backend = tdbsam

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting.
# Note: Consider carefully the location in the configuration file of
#       this line.  The included file is read at that point.
;   include = /usr/local/samba/lib/smb.conf.%m

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
;   interfaces = 192.168.12.2/24 192.168.13.2/24

# Where to store roving profiles (only for Win95 and WinNT)
#        %L substitutes for this servers netbios name, %U is username
#        You must uncomment the [Profiles] share below
;   logon path = \\%L\Profiles\%U

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
;   wins support = yes

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
#	Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = w.x.y.z

# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one	WINS Server on the network. The default is NO.
;   wins proxy = yes

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The default is NO.
;   dns proxy = no

# These scripts are used on a domain controller or stand-alone
# machine to add or delete corresponding unix accounts
;  add user script = /usr/sbin/useradd %u
;  add group script = /usr/sbin/groupadd %g
;  add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
;  delete user script = /usr/sbin/userdel %u
;  delete user from group script = /usr/sbin/deluser %u %g
;  delete group script = /usr/sbin/groupdel %g


#============================ Share Definitions ==============================
[homes]
   comment = Home Directories
   browsable = yes
   writable = yes

# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
;   comment = Network Logon Service
;   path = /usr/local/samba/lib/netlogon
;   guest ok = yes
;   writable = no
;   share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
;    path = /usr/local/samba/profiles
;    browsable = no
;    guest ok = yes


# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
   comment = All Printers
   path = /usr/spool/samba
   browsable = yes
# Change 'guest ok' from 'no' to 'yes' to allow the 'guest account' user to print
   guest ok = no
   writable = no
   printable = yes

# This one is useful for people to share files
;[tmp]
;   comment = Temporary file space
;   path = /tmp
;   read only = no
;   public = yes

# A publicly accessible directory, but read only, except for people in
# the "staff" group
;[public]
;   comment = Public Stuff
;   path = /home/samba
;   public = yes
;   writable = no
;   printable = no
;   write list = @staff

# Other examples.
#
# A private printer, usable only by fred. Spool data will be placed in fred's
# home directory. Note that fred must have write access to the spool directory,
# wherever it is.
;[fredsprn]
;   comment = Fred's Printer
;   valid users = fred
;   path = /homes/fred
;   printer = freds_printer
;   public = no
;   writable = no
;   printable = yes

# A private directory, usable only by fred. Note that fred requires write
# access to the directory.
;[fredsdir]
;   comment = Fred's Service
;   path = /usr/somewhere/private
;   valid users = fred
;   public = no
;   writable = yes
;   printable = no

# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %U option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;[pchome]
;  comment = PC Directories
;  path = /usr/pc/%m
;  public = no
;  writable = yes

# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
;[public]
;   path = /usr/somewhere/else/public
;   public = yes
;   only guest = yes
;   writable = yes
;   printable = no

# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
;[myshare]
;   comment = Mary's and Fred's stuff
;   path = /usr/somewhere/shared
;   valid users = mary fred
;   public = no
;   writable = yes
;   printable = no
;   create mask = 0765

Last edited by sgolding81 (2023-05-28 11:03:58)

Offline

#4 2023-05-28 10:32:48

jonno2002
Member
Registered: 2016-11-21
Posts: 868

Re: Unable to browse network or setup network printer

avahi should 'just work' out of the box without changing the config, try reverting any changes you made and try again.

systemctl status avahi-daemon

should give you some info.

i havent used gvfs for ages but i remember that when it failed to work i used to close thunar (gnome files in your case) then 'pkill gvfs' and then open thunar again and just like magic network browse worked again.
if that doesnt work.....

post outputs of:

smbtree
grep -v "^#\|^$\|^;" /etc/samba/smb.conf

smbtree will ask for password, just press enter as the -N flag is broken since ages ago

Offline

#5 2023-05-28 10:38:39

sgolding81
Member
From: Australia
Registered: 2023-05-28
Posts: 8

Re: Unable to browse network or setup network printer

systemctl status avahi-daemon:

 avahi-daemon.service - Avahi mDNS/DNS-SD Stack
     Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; enabled; preset: disabled)
     Active: active (running) since Sun 2023-05-28 19:40:12 AEST; 54min ago
TriggeredBy: ● avahi-daemon.socket
   Main PID: 469 (avahi-daemon)
     Status: "avahi-daemon 0.8 starting up."
      Tasks: 2 (limit: 9132)
     Memory: 1.2M
        CPU: 59ms
     CGroup: /system.slice/avahi-daemon.service
             ├─469 "avahi-daemon: running [archthinkpad.local]"
             └─478 "avahi-daemon: chroot helper"

May 28 19:40:12 archthinkpad systemd[1]: Started Avahi mDNS/DNS-SD Stack.
May 28 19:40:13 archthinkpad avahi-daemon[469]: Server startup complete. Host name is archthinkpad.l>
May 28 19:40:17 archthinkpad avahi-daemon[469]: Joining mDNS multicast group on interface wlp5s0.IPv>
May 28 19:40:17 archthinkpad avahi-daemon[469]: New relevant interface wlp5s0.IPv6 for mDNS.
May 28 19:40:17 archthinkpad avahi-daemon[469]: Registering new address record for fe80::f97:6eaf:ef>
May 28 19:40:17 archthinkpad avahi-daemon[469]: Joining mDNS multicast group on interface wlp5s0.IPv>
May 28 19:40:17 archthinkpad avahi-daemon[469]: New relevant interface wlp5s0.IPv4 for mDNS.
May 28 19:40:17 archthinkpad avahi-daemon[469]: Registering new address record for 192.168.178.37 on>
May 28 20:05:48 archthinkpad avahi-daemon[469]: Files changed, reloading.
May 28 20:05:48 archthinkpad avahi-daemon[469]: No service file found in /etc/avahi/services.

smbtree:

main: This is utility doesn't work if netbios name resolution is not configured.
If you are using SMB2 or SMB3, network browsing uses WSD/LLMNR, which is not yet supported by Samba. SMB1 is disabled by default on the latest Windows versions for security reasons. It is still possible to access the Samba resources directly via \name or \ip.address.

grep -v "^#\|^$\|^;" /etc/samba/smb.conf:

[global]
   workgroup = WORKGROUP
   domain master = auto  
   server string = Arch Samba Server
   server role = standalone server
  client min protocol = NT1
   log file = /usr/local/samba/var/log.%m
   max log size = 50
[homes]
   comment = Home Directories
   browsable = yes
   writable = yes
[printers]
   comment = All Printers
   path = /usr/spool/samba
   browsable = yes
   guest ok = no
   writable = no
   printable = yes

Last edited by sgolding81 (2023-05-28 11:03:06)

Offline

#6 2023-05-28 10:44:42

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,244

Re: Unable to browse network or setup network printer

Please use [code][/code] tags, not "quote" tags. Edit your post in this regard.

Does

avahi-browse --all --ignore-local --resolve --terminate

list any services?

Also avahi is terrible protocol and w/ the fritzbox you've a local DNS server. Use that.

Then just add the printer by IP or domain in cups.

Offline

#7 2023-05-28 10:59:54

jonno2002
Member
Registered: 2016-11-21
Posts: 868

Re: Unable to browse network or setup network printer

gvfs-smb MAY require netbios name resolution to work, so you need to enable and start nmb.service

as for avahi and printers, i have very little experience but i do remember when i set up the printer years ago i had to use avahi for it to work

Offline

#8 2023-05-28 11:02:21

sgolding81
Member
From: Australia
Registered: 2023-05-28
Posts: 8

Re: Unable to browse network or setup network printer

avahi-browse --all --ignore-local --resolve --terminate

does not return any result.

Do you suggest I remove/disable avahi as this may be causing the issue?

Offline

#9 2023-05-28 11:05:49

sgolding81
Member
From: Australia
Registered: 2023-05-28
Posts: 8

Re: Unable to browse network or setup network printer

jonno2002 wrote:

gvfs-smb MAY require netbios name resolution to work, so you need to enable and start nmb.service

nmb.service is enabled and running.

Offline

#10 2023-05-28 11:38:09

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,244

Re: Unable to browse network or setup network printer

I'd simply not bother w/ avahi, as it's not required for IPP (or anything) - you can just add the IPP printer via IP or domain (if it gets one from the fritzbox, which you can see in the fritzbox)
You might also want to nmap the printer IP for port 5353 to see whether it supports mdns/avahi to begin with.

Offline

#11 2023-05-28 11:46:14

jonno2002
Member
Registered: 2016-11-21
Posts: 868

Re: Unable to browse network or setup network printer

yea sorry about the avahi mess, i set up my printer years ago and avahi was the only thing that worked, but since reading this thread ive removed avahi from my system and just added the printer by IP address, no idea why i couldnt do that years ago but hey it works now.

the fact that smbtree isnt working shows that something is wrong but im out of ideas sorry

Offline

#12 2023-05-28 11:57:07

sgolding81
Member
From: Australia
Registered: 2023-05-28
Posts: 8

Re: Unable to browse network or setup network printer

nmap from printer:

Starting Nmap 7.94 ( https://nmap.org ) at 2023-05-28 21:53 AEST
Nmap scan report for BRWC038969AEFB6.fritz.box (192.168.178.40)
Host is up (0.017s latency).
Not shown: 993 closed tcp ports (reset)
PORT     STATE SERVICE
21/tcp   open  ftp
23/tcp   open  telnet
80/tcp   open  http
443/tcp  open  https
515/tcp  open  printer
631/tcp  open  ipp
9100/tcp open  jetdirect
MAC Address: C0:38:96:9A:EF:B6 (Hon Hai Precision Ind.)

Nmap done: 1 IP address (1 host up) scanned in 7.44 seconds

Going to try disabling avahi and see if cups detects the printer.

Last edited by sgolding81 (2023-05-28 11:58:19)

Offline

#13 2023-05-28 12:09:58

sgolding81
Member
From: Australia
Registered: 2023-05-28
Posts: 8

Re: Unable to browse network or setup network printer

Well, gnome printer settings is now detecting the printer on the network and returning results for Jetdirect, LPD and IPP, however it fails to add IPP and needs drivers for the other two. I'd say that's progress, though not quite there.

Cups still won't detect the printer.

Offline

#14 2023-05-28 12:15:48

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,244

Re: Unable to browse network or setup network printer

Assuming that thing does support IPP everywhere, https://wiki.archlinux.org/title/CUPS#lp*
However, 631 on the printer is open, so you can also try https://wiki.archlinux.org/title/CUPS#Network_2
And see the note abotu having cups-pdf in https://wiki.archlinux.org/title/CUPS#Installation

Offline

#15 2023-05-28 12:27:17

jonno2002
Member
Registered: 2016-11-21
Posts: 868

Re: Unable to browse network or setup network printer

have you installed the drivers ? the AUR has loads of brother printer drivers so just look up your particular model

Offline

#16 2023-05-28 12:29:29

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,244

Re: Unable to browse network or setup network printer

The wiki wrote:

Note: As drivers are deprecated in CUPS in favor of IPP Everywhere you may need to install cups-pdf to get printing to work. Without this package you may see an error like: client-error-document-format-not-supported. The package is needed because IPP Everywhere sends a PDF directly to the printer, therefore cups-pdf is needed to convert everything you want to print to a PDF first.

The brother drivers are typically all lifted from some ancient i386 debian - if you can run w/o them, you'll have a much easier life.

Offline

#17 2023-05-28 13:09:53

sgolding81
Member
From: Australia
Registered: 2023-05-28
Posts: 8

Re: Unable to browse network or setup network printer

seth wrote:

Assuming that thing does support IPP everywhere, https://wiki.archlinux.org/title/CUPS#lp*

This worked and I now have an AirPrint option installed. It's different to how it appears on my other machines, though it works and that's the main thing.

I still feel there is something not right in my configuration or I'm missing a crucial package which is preventing the printer from being automatically discovered and preventing me from browsing the network. Normally when this printer appears on a linux distro, it is just automatically discovered by it's hostname. Not sure why I can't see any of my other machines in the Gnome Files app either.

Offline

#18 2023-05-28 14:42:04

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,244

Re: Unable to browse network or setup network printer

If by "seeing" you mean some smb share, cut out gnome and try smbclient, https://wiki.archlinux.org/title/Samba#Client

SMB discovery (ie. listing available hosts/shares) relies on avahi (because SMBv1/NetBIOS was terminated after wannacry) so you have to properly configure mdns.
https://wiki.archlinux.org/title/Avahi#Installation
Do you use systemd-resolved and did you disable its mdns responder?

Offline

Board footer

Powered by FluxBB