这不是
“如何映射网络扫描仪”的
重复
如何映射网络扫描仪
它甚至没有提到这个错误信息。
● saned.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
- 我在这台电脑上有一个可以正常工作的 USB 扫描仪。
- 我需要 saned 能够正常工作 [不错或隐藏] 以便我可以从另一台 Ubuntu 18.04.1 计算机访问它。
- 两台电脑均独家安装 Ubuntu 18.04.1,且在过去 24 小时内更新
- 两者都是 HP:
- 这是一台 HP 110-220z,附带 HP Office Jet Pro 6830 一体式扫描打印机。
- 我想要访问扫描仪的是 HP Envyt 1200
- XSane 通过扫描仪生成扫描图像。
我已遵循
https://help.ubuntu.com/community/SaneDaemonTutorial
和
无法启动 saned.service:单元 saned.service 被屏蔽
包括将
##访问列表
192.168.0.0/24添加
到
/etc/sane.d/saned.conf:
直到我得到
● saned.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
完成以下操作后,我重新启动
并得到与上述相同的结果。
下一步在哪里?
这就是我所做的
终端
[为清楚起见,已删除密码请求行和计算机名称字符串]
~$ sudo nano /etc/systemd/system/saned.socket
~$ sudo nano /etc/systemd/system/[email protected]
~$ sudo nano /etc/default/saned
~$ sudo nano /etc/sane.d/saned.conf
~$ sudo systemctl enable saned.socket
Created symlink /etc/systemd/system/sockets.target.wants/saned.socket → /etc/systemd/system/saned.socket.
~$ sudo systemctl start saned.socket
~$ systemctl status saned.socket
● saned.socket - saned incoming socket
Loaded: loaded (/etc/systemd/system/saned.socket; enabled; vendor preset: ena
Active: active (listening) since Fri 2019-03-01 19:31:08 EST; 16s ago
Listen: [::]:6566 (Stream)
Accepted: 0; Connected: 0
Tasks: 0 (limit: 4915)
CGroup: /system.slice/saned.socket
Mar 01 19:31:08 anne-110-220z systemd[1]: Listening on saned incoming socket.
~$ sudo service saned restart
Failed to restart saned.service: Unit saned.service is masked.
~$ sudo systemctl start saned.socket
~$ sudo systemctl enable saned.socket
~$ sudo service saned status
● saned.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
~$ sudo systemctl start saned.socket
~$ sudo service saned status
● saned.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
~$ sudo apt-get updat
E: Invalid operation updat
~$ sudo apt-get update
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:5 https://deb.opera.com/opera-stable stable InRelease [2,591 B]
Get:6 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [270 kB]
Get:7 http://security.ubuntu.com/ubuntu bionic-security/main i386 Packages [204 kB]
Get:8 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [204 B]
Get:9 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [126 kB]
Get:10 http://security.ubuntu.com/ubuntu bionic-security/universe i386 Packages [123 kB]
Get:11 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [20.8 kB]
Get:12 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 48x48 Icons [12.2 kB]
Get:13 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 64x64 Icons [45.2 kB]
Get:14 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B]
Get:15 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [531 kB]
Get:16 http://us.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [457 kB]
Get:17 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [278 kB]
Get:18 http://us.archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 48x48 Icons [66.7 kB]
Get:19 http://us.archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 64x64 Icons [123 kB]
Get:20 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [737 kB]
Get:21 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [728 kB]
Get:22 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [202 kB]
Get:23 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 48x48 Icons [186 kB]
Get:24 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 64x64 Icons [339 kB]
Get:25 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,468 B]
Get:26 http://us.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [7,352 B]
Get:27 https://deb.opera.com/opera-stable stable/non-free i386 Packages [1,820 B]
Get:28 https://deb.opera.com/opera-stable stable/non-free amd64 Packages [1,818 B]
Fetched 4,720 kB in 4s (1,238 kB/s)
Reading package lists... Done
~$ sudo service saned status
● saned.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
~$ sudo systemctl start saned.socket
~$ sudo service saned status
● saned.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
~$ sudo add-apt-repository ppa:rolfbensch/sane-release
Ubuntu SANE packages from SANE Stable Source (https://alioth.debian.org/frs/?group_id=30186).
Please send scanner related questions to the SANE mailing list <email address hidden>.
If you need the more recent scanner driver from git, you can use my other PPA: https://launchpad.net/~rolfbensch/+archive/ubuntu/sane-git.
More info: https://launchpad.net/~rolfbensch/+archive/ubuntu/sane-release
Press [ENTER] to continue or Ctrl-c to cancel adding it.
Hit:1 https://deb.opera.com/opera-stable stable InRelease
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease
Ign:5 http://ppa.launchpad.net/rolfbensch/sane-release/ubuntu bionic InRelease
Hit:6 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease
Err:7 http://ppa.launchpad.net/rolfbensch/sane-release/ubuntu bionic Release
404 Not Found [IP: 91.189.95.83 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/rolfbensch/sane-release/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
anne@anne-110-220z:~$ sudo service saned status
● saned.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
anne@anne-110-220z:~$ sudo systemctl start saned.socket
anne@anne-110-220z:~$ sudo service saned status
● saned.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
~$
/etc/saned/saned.conf
已修改并保存
# saned.conf
# Configuration for the saned daemon
## Daemon options
# Port range for the data connection. Choose a range inside [1024 - 65535].
# Avoid specifying too large a range, for performance reasons.
#
# ONLY use this if your saned server is sitting behind a firewall. If your
# firewall is a Linux machine, we strongly recommend using the
# Netfilter nf_conntrack_sane connection tracking module instead.
#
# data_portrange = 10000 - 10100
## Access list
192.168.0.0/24
# A list of host names, IP addresses or IP subnets (CIDR notation) that
# are permitted to use local SANE devices. IPv6 addresses must be enclosed
# in brackets, and should always be specified in their compressed form.
#
# The hostname matching is not case-sensitive.
#scan-client.somedomain.firm
#192.168.0.1
#192.168.0.1/29
#[2001:db8:185e::42:12]
#[2001:db8:185e::42:12]/64
# NOTE: /etc/inetd.conf (or /etc/xinetd.conf) and
# /etc/services must also be properly configured to start
# the saned daemon as documented in saned(8), services(4)
# and inetd.conf(4) (or xinetd.conf(5)).
/etc/默认/saned
已编辑并保存。
# Defaults for the saned initscript, from sane-utils
# To enable under systemd please read README.Debian
# Set to yes to start saned under SysV
RUN=yes
# Set to the user saned should run as
RUN_AS_USER=saned
/etc/hosts.allow
已编辑并保存。
# /etc/hosts.allow: list of hosts that are allowed to access the system.
# See the manual pages hosts_access(5) and hosts_options(5).
#
# Example: ALL: LOCAL @some_netgroup
# ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
#
# If you're going to protect the portmapper use the name "rpcbind" for the
# daemon name. See rpcbind(8) and rpc.mountd(8) for further information.
#
saned 192.168.0
关闭全部
重新启动
重新运行
~$ sudo service saned status
[sudo] password for anne:
● saned.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
注意到了这条注释
# NOTE: /etc/inetd.conf (or /etc/xinetd.conf) and
# /etc/services must also be properly configured to start
# the saned daemon as documented in saned(8), services(4)
# and inetd.conf(4) (or xinetd.conf(5)).
尝试阅读,
但发现我能做的事情却令人困惑不已。
这不是我应该对 inetd.conf (或 /etc/xinetd.conf)和服务所做的!正确配置它们以使“saned.service”正常工作_
/etc/services 确实包含:##
sane-port 6566/tcp # SANE network scanner daemon
/etc/inetd.conf 不存在,应该吗?##
Ubuntu 软件不提供它。##
inetd.conf 中的这个条目用什么来代替?
sane-port stream tcp nowait saned.saned /usr/local/sbin/saned saned
或者,如果你的系统使用 tcpd,则有如下一行:
sane-port stream tcp nowait saned.saned /usr/local/sbin/tcpd saned
如果需要,我如何找出我的系统正在使用哪一个
/etc/xinetd 不存在。应该存在吗?##
Ubuntu 软件不提供该功能。
在 xinetd 中这个条目用什么来代替?
你的 /etc/xinetd.conf 应该包含如下块:
service sane-port
{
socket_type = stream
server = /usr/local/sbin/saned
protocol = tcp
user = saned
group = saned
wait = no
disable = no
}
本页下面建议的问题似乎均不相关。