| 1 |
.TH saned 8 "29 Sep 2017" "" "SANE Scanner Access Now Easy" |
| 2 |
.IX saned |
| 3 |
.SH NAME |
| 4 |
saned \- SANE network daemon |
| 5 |
.SH SYNOPSIS |
| 6 |
.B saned |
| 7 |
.B [ \-a |
| 8 |
.I [ username ] |
| 9 |
.B ] |
| 10 |
.B [ \-u |
| 11 |
.I username |
| 12 |
.B ] |
| 13 |
.B [ \-b |
| 14 |
.I address |
| 15 |
.B ] |
| 16 |
.B [ \-p |
| 17 |
.I port |
| 18 |
.B ] |
| 19 |
.B [ \-l ] |
| 20 |
.B [ \-D ] |
| 21 |
.B [ \-o ] |
| 22 |
.B [ \-d |
| 23 |
.I n |
| 24 |
.B ] |
| 25 |
.B [ \-e ] |
| 26 |
.B [ \-h ] |
| 27 |
.B [ \-B |
| 28 |
.I buffer-size |
| 29 |
.B ] |
| 30 |
|
| 31 |
.SH DESCRIPTION |
| 32 |
.B saned |
| 33 |
is the SANE (Scanner Access Now Easy) daemon that allows remote clients |
| 34 |
to access image acquisition devices available on the local host. |
| 35 |
|
| 36 |
.SH OPTIONS |
| 37 |
.PP |
| 38 |
.B saned |
| 39 |
recognises the following options: |
| 40 |
|
| 41 |
.TP |
| 42 |
.BR \-a "\fI [username]\fR, " \-\-alone [=\fIusername]\fR |
| 43 |
is equivalent to the combination of |
| 44 |
.B \-l \-D \-u |
| 45 |
.I username |
| 46 |
options. However, |
| 47 |
.I username |
| 48 |
is optional and running user will only be set when specified. |
| 49 |
|
| 50 |
.TP |
| 51 |
.BR \-u "\fI username\fR, " \-\-user =\fIusername\fR |
| 52 |
requests that |
| 53 |
.B saned |
| 54 |
drop root privileges and run as the user (and group) associated with |
| 55 |
.I username |
| 56 |
after binding. |
| 57 |
|
| 58 |
.TP |
| 59 |
.BR \-b "\fI address\fR, " \-\-bind =\fIaddress\fR |
| 60 |
tells |
| 61 |
.B saned |
| 62 |
to bind to the |
| 63 |
.I address |
| 64 |
given. |
| 65 |
|
| 66 |
.TP |
| 67 |
.BR \-p "\fI port\fR, " \-\-port=\fIport\fR |
| 68 |
tells |
| 69 |
.B saned |
| 70 |
to listen on the |
| 71 |
.I port |
| 72 |
given. A value of 0 tells |
| 73 |
.B saned |
| 74 |
to pick an unused port. The default is the |
| 75 |
.B sane-port (6566). |
| 76 |
|
| 77 |
.TP |
| 78 |
.BR \-l ", " \-\-listen |
| 79 |
requests that |
| 80 |
.B saned |
| 81 |
run in standalone daemon mode. In this mode, |
| 82 |
.B saned |
| 83 |
will listen for incoming client connections; |
| 84 |
.BR inetd (8) |
| 85 |
is not required for |
| 86 |
.B saned |
| 87 |
operations in this mode. |
| 88 |
|
| 89 |
.TP |
| 90 |
.BR \-D ", " \-\-daemonize |
| 91 |
will request |
| 92 |
.B saned |
| 93 |
to detach from the console and run in the background. |
| 94 |
|
| 95 |
.TP |
| 96 |
.BR \-n ", " \-\-allow\-network |
| 97 |
allows |
| 98 |
.B saned |
| 99 |
to use network scanners. By default this is forbidden to prevent |
| 100 |
.B saned |
| 101 |
from contacting itself. When enabled, the configuration of the |
| 102 |
.BR sane-net (5) |
| 103 |
backend should not mention the address on which |
| 104 |
.B saned |
| 105 |
is listening. |
| 106 |
|
| 107 |
.TP |
| 108 |
.BR \-o ", " \-\-once |
| 109 |
requests that |
| 110 |
.B saned |
| 111 |
exits after the first client disconnects. This is useful for debugging. |
| 112 |
|
| 113 |
.TP |
| 114 |
.BR \-d "\fI n\fR, " \-\-debug =\fIn\fR |
| 115 |
sets the level of |
| 116 |
.B saned |
| 117 |
debug output to |
| 118 |
.IR n . |
| 119 |
When compiled with debugging enabled, this flag may be |
| 120 |
followed by a number to request more or less debug info. The larger |
| 121 |
the number, the more verbose the debug output. E.g., |
| 122 |
.B \-d128 |
| 123 |
will request output of all debug info. A level of 0 produces no |
| 124 |
output at all. The default value is 2. |
| 125 |
|
| 126 |
.TP |
| 127 |
.BR \-e ", " \-\-stderr |
| 128 |
will divert |
| 129 |
.B saned |
| 130 |
debug output to stderr instead of the syslog default. |
| 131 |
|
| 132 |
.TP |
| 133 |
.BR \-B ", " \-\-buffer-size=\fIbuffer\-size\fR |
| 134 |
specifies the size of the read buffer used for communication with the backend in KB. |
| 135 |
Default value is 1MB. |
| 136 |
|
| 137 |
.TP |
| 138 |
.BR \-h ", " \-\-help |
| 139 |
displays a short help message. |
| 140 |
|
| 141 |
.SH CONFIGURATION |
| 142 |
The |
| 143 |
.I saned.conf |
| 144 |
configuration file contains both options for the daemon and the access |
| 145 |
list. |
| 146 |
.TP |
| 147 |
\fBdata_portrange\fP = \fImin_port\fP - \fImax_port\fP |
| 148 |
Specify the port range to use for the data connection. Pick a port |
| 149 |
range between 1024 and 65535; don't pick a too large port range, as it |
| 150 |
may have performance issues. Use this option if your |
| 151 |
.B saned |
| 152 |
server is sitting behind a firewall. If that firewall is a Linux |
| 153 |
machine, we strongly recommend using the Netfilter |
| 154 |
\fInf_conntrack_sane\fP module instead. |
| 155 |
.TP |
| 156 |
\fBdata_connect_timeout\fP = \fItimeout\fP |
| 157 |
Specify the time in milliseconds that |
| 158 |
.B saned |
| 159 |
will wait for a data |
| 160 |
connection. Without this option, if the data connection is not done |
| 161 |
before the scanner reaches the end of scan, the scanner will continue |
| 162 |
to scan past the end and may damage it depending on the |
| 163 |
backend. Specify zero to have the old behavior. The default is 4000ms. |
| 164 |
.PP |
| 165 |
The access list is a list of host names, IP addresses or IP subnets |
| 166 |
(CIDR notation) that are permitted to use local SANE devices. IPv6 |
| 167 |
addresses must be enclosed in brackets, and should always be specified |
| 168 |
in their compressed form. Connections from localhost are always |
| 169 |
permitted. Empty lines and lines starting with a hash mark (#) are |
| 170 |
ignored. A line containing the single character ``+'' is interpreted |
| 171 |
to match any hostname. This allows any remote machine to use your |
| 172 |
scanner and may present a security risk, so this shouldn't be used |
| 173 |
unless you know what you're doing. |
| 174 |
.PP |
| 175 |
A sample configuration file is shown below: |
| 176 |
.PP |
| 177 |
.RS |
| 178 |
# Daemon options |
| 179 |
.br |
| 180 |
data_portrange = 10000 - 10100 |
| 181 |
.br |
| 182 |
# Access list |
| 183 |
.br |
| 184 |
scan\-client.somedomain.firm |
| 185 |
.br |
| 186 |
# this is a comment |
| 187 |
.br |
| 188 |
192.168.0.1 |
| 189 |
.br |
| 190 |
192.168.2.12/29 |
| 191 |
.br |
| 192 |
[::1] |
| 193 |
.br |
| 194 |
[2001:db8:185e::42:12]/64 |
| 195 |
.RE |
| 196 |
.PP |
| 197 |
The case of the host names does not matter, so AHost.COM is considered |
| 198 |
identical to ahost.com. |
| 199 |
.SH FILES |
| 200 |
.TP |
| 201 |
.I /etc/hosts.equiv |
| 202 |
The hosts listed in this file are permitted to access all local SANE |
| 203 |
devices. Caveat: this file imposes serious security risks and its use |
| 204 |
is not recommended. |
| 205 |
.TP |
| 206 |
.I /etc/sane.d/saned.conf |
| 207 |
Contains a list of hosts permitted to access local SANE devices (see |
| 208 |
also description of |
| 209 |
.B SANE_CONFIG_DIR |
| 210 |
below). |
| 211 |
.TP |
| 212 |
.I /etc/sane.d/saned.users |
| 213 |
If this file contains lines of the form |
| 214 |
|
| 215 |
user:password:backend |
| 216 |
|
| 217 |
access to the listed backends is restricted. A backend may be listed multiple |
| 218 |
times for different user/password combinations. The server uses MD5 hashing |
| 219 |
if supported by the client. |
| 220 |
.SH ENVIRONMENT |
| 221 |
.TP |
| 222 |
.B SANE_CONFIG_DIR |
| 223 |
This environment variable specifies the list of directories that may |
| 224 |
contain the configuration file. On *NIX systems, the directories are |
| 225 |
separated by a colon (`:'), under OS/2, they are separated by a |
| 226 |
semi-colon (`;'). If this variable is not set, the configuration file |
| 227 |
is searched in two default directories: first, the current working |
| 228 |
directory (".") and then in |
| 229 |
.IR /etc/sane.d . |
| 230 |
If the value of the |
| 231 |
environment variable ends with the directory separator character, then |
| 232 |
the default directories are searched after the explicitly specified |
| 233 |
directories. For example, setting |
| 234 |
.B SANE_CONFIG_DIR |
| 235 |
to "/tmp/config:" would result in directories |
| 236 |
.IR tmp/config , |
| 237 |
.IR . , |
| 238 |
and |
| 239 |
.I "/etc/sane.d" |
| 240 |
being searched (in this order). |
| 241 |
|
| 242 |
.SH NOTES |
| 243 |
.B saned |
| 244 |
does |
| 245 |
.I not |
| 246 |
provide confidentiality when communicating with clients. If |
| 247 |
.B saned |
| 248 |
is exposed directly on the network, other users may be able to intercept |
| 249 |
scanned images, or learn passwords for connecting to |
| 250 |
.BR saned , |
| 251 |
with little effort. Client systems should connect to |
| 252 |
.B saned |
| 253 |
through a secure tunnel to the server instead. |
| 254 |
.PP |
| 255 |
.B saned |
| 256 |
is not a trusted program and should not run with root privileges. |
| 257 |
.PP |
| 258 |
Refer to |
| 259 |
.I /usr/share/doc/libsane/saned/saned.install.md |
| 260 |
for details on configuring |
| 261 |
.B saned |
| 262 |
as a service. |
| 263 |
|
| 264 |
.SH "SEE ALSO" |
| 265 |
.BR sane (7), |
| 266 |
.BR scanimage (1), |
| 267 |
.BR xscanimage (1), |
| 268 |
.BR xcam (1), |
| 269 |
.BR sane\-dll (5), |
| 270 |
.BR sane\-net (5), |
| 271 |
.BR sane\-"backendname" (5), |
| 272 |
.BR inetd (8), |
| 273 |
.BR xinetd (8), |
| 274 |
.BR systemd (1) |
| 275 |
.br |
| 276 |
.I http://www.penguin-breeder.org/?page=sane\-net |
| 277 |
.SH AUTHOR |
| 278 |
David Mosberger |