]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/amd/hlfsd/hlfsd.8
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / amd / hlfsd / hlfsd.8
1 .\"
2 .\" Copyright (c) 1997-2006 Erez Zadok
3 .\" Copyright (c) 1989 Jan-Simon Pendry
4 .\" Copyright (c) 1989 Imperial College of Science, Technology & Medicine
5 .\" Copyright (c) 1989 The Regents of the University of California.
6 .\" All rights reserved.
7 .\"
8 .\" This code is derived from software contributed to Berkeley by
9 .\" Jan-Simon Pendry at Imperial College, London.
10 .\"
11 .\" Redistribution and use in source and binary forms, with or without
12 .\" modification, are permitted provided that the following conditions
13 .\" are met:
14 .\" 1. Redistributions of source code must retain the above copyright
15 .\"    notice, this list of conditions and the following disclaimer.
16 .\" 2. Redistributions in binary form must reproduce the above copyright
17 .\"    notice, this list of conditions and the following disclaimer in the
18 .\"    documentation and/or other materials provided with the distribution.
19 .\" 3. All advertising materials mentioning features or use of this software
20 .\"    must display the following acknowledgment:
21 .\"      This product includes software developed by the University of
22 .\"      California, Berkeley and its contributors.
23 .\" 4. Neither the name of the University nor the names of its contributors
24 .\"    may be used to endorse or promote products derived from this software
25 .\"    without specific prior written permission.
26 .\"
27 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 .\" SUCH DAMAGE.
38 .\"
39 .\" $Id: hlfsd.8,v 1.11.2.1 2006/01/02 18:48:25 ezk Exp $
40 .\" $FreeBSD$
41 .\"
42 .\" HLFSD was written at Columbia University Computer Science Department, by
43 .\" Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@smarts.com>
44 .\" It is distributed under the same terms and conditions as AMD.
45 .\"
46 .Dd January 2, 2006
47 .Dt HLFSD 8
48 .Os
49 .Sh NAME
50 .Nm hlfsd
51 .Nd home-link file system daemon
52 .Sh SYNOPSIS
53 .Nm
54 .Op Fl fhnpvC
55 .Op Fl a Ar alt_dir
56 .Op Fl c Ar cache-interval
57 .Op Fl g Ar group
58 .Op Fl i Ar reload-interval
59 .Op Fl l Ar logfile
60 .Op Fl o Ar mount-options
61 .Op Fl x Ar log-options
62 .Op Fl D Ar debug-options
63 .Op Fl P Ar password-file
64 .Op Ar linkname Op Ar subdir
65 .Sh DESCRIPTION
66 The
67 .Nm
68 utility
69 is a daemon which implements a file system containing a symbolic link to
70 subdirectory within a user's home directory, depending on the user
71 which accessed that link.
72 It was primarily designed to redirect
73 incoming mail to users' home directories, so that it can read from
74 anywhere.
75 .Pp
76 The
77 .Nm
78 utility
79 operates by mounting itself as an
80 .Tn NFS
81 server for the directory containing
82 .Ar linkname ,
83 which defaults to
84 .Pa /hlfs/home .
85 Lookups within that directory are handled by
86 .Nm ,
87 which uses the password map to determine how to resolve the lookup.
88 The directory will be created if it does not already exist.
89 The symbolic link will be to the accessing user's home directory, with
90 .Ar subdir
91 appended to it.
92 If not specified,
93 .Ar subdir
94 defaults to
95 .Pa .hlfsdir .
96 This directory will also be created if it does not already exist.
97 .Pp
98 A
99 .Dv SIGTERM
100 sent to
101 .Nm
102 will cause it to shutdown.
103 A
104 .Dv SIGHUP
105 will flush the internal
106 caches, and reload the password map.
107 It will also close and
108 reopen the log file, to enable the original log file to be
109 removed or rotated.
110 A
111 .Dv SIGUSR1
112 will cause it to dump its internal
113 table of user IDs and home directories to the file
114 .Pa /usr/tmp/hlfsd.dump.XXXXXX .
115 .Sh OPTIONS
116 .Bl -tag -width indent
117 .It Fl a Ar alt_dir
118 Alternate directory.
119 The name of the directory to which
120 the symbolic link returned by
121 .Nm
122 will point, if it cannot access the home directory of the user.
123 This
124 defaults to
125 .Pa /var/hlfs .
126 This directory will be created if it does not exist.
127 It is expected
128 that either users will read these files, or the system administrators
129 will run a script to resend this
130 .Dq lost mail
131 to its owner.
132 .It Fl c Ar cache-interval
133 Caching interval.
134 The
135 .Nm
136 utility
137 will cache the validity of home directories for this interval, in
138 seconds.
139 Entries which have been verified within the last
140 .Ar cache-interval
141 seconds will not be verified again, since the operation could
142 be expensive, and the entries are most likely still valid.
143 After the interval has expired,
144 .Nm
145 will re-verify the validity of the user's home directory, and
146 reset the cache time-counter.
147 The default value for
148 .Ar cache-interval
149 is 300 seconds (5 minutes).
150 .It Fl f
151 Force fast startup.
152 This option tells
153 .Nm
154 to skip startup-time consistency checks such as existence of mount
155 directory, alternate spool directory, symlink to be hidden under the
156 mount directory, their permissions and validity.
157 .It Fl g Ar group
158 Set the special group
159 .Dv HLFS_GID
160 to
161 .Ar group .
162 Programs such as
163 .Xr comsat 8 ,
164 (which access the mailboxes of other users) must be setgid
165 .Dv HLFS_GID
166 to work properly.
167 The default group is
168 .Dq Li hlfs .
169 If no group is provided,
170 and there is no group
171 .Dq Li hlfs ,
172 this feature is disabled.
173 .It Fl h
174 Help.
175 Print a brief help message, and exit.
176 .It Fl i Ar reload-interval
177 Map-reloading interval.
178 Each
179 .Ar reload-interval
180 seconds,
181 .Nm
182 will reload the password map.
183 The
184 .Nm
185 utility
186 needs the password map for the UIDs and home directory pathnames.
187 The
188 .Nm
189 utility schedules a
190 .Dv SIGALRM
191 to reload the password maps.
192 A
193 .Dv SIGHUP
194 sent to
195 .Nm
196 will force it to reload the maps immediately.
197 The default
198 value for
199 .Ar reload-interval
200 is 900 seconds (15 minutes).
201 .It Fl l Ar logfile
202 Specify a log file to which
203 .Nm
204 will record events.
205 If
206 .Ar logfile
207 is the string
208 .Dq Li syslog
209 then the log messages will be sent to the system log daemon by
210 .Xr syslog 3 ,
211 using the
212 .Dv LOG_DAEMON
213 facility.
214 This is also the default.
215 .It Fl n
216 No verify.
217 The
218 .Nm
219 utility
220 will not verify the validity of the symbolic link it will be
221 returning, or that the user's home directory contains
222 sufficient disk-space for spooling.
223 This can speed up
224 .Nm
225 at the cost of possibly returning symbolic links to home
226 directories which are not currently accessible or are full.
227 By default,
228 .Nm
229 validates the symbolic-link in the background.
230 The
231 .Fl n
232 option overrides the meaning of the
233 .Fl c
234 option, since no caching is necessary.
235 .It Fl o Ar mount-options
236 Mount options.
237 Mount options which
238 .Nm
239 will use to mount itself on top of
240 .Ar dirname .
241 By default,
242 .Ar mount-options
243 is set to
244 .Dq Li ro .
245 If the system supports symbolic-link caching, default
246 options are set to
247 .Dq Li ro,nocache .
248 .It Fl p
249 Print PID.
250 Outputs the process ID of
251 .Nm
252 to standard output where it can be saved into a file.
253 .It Fl v
254 Version.
255 Displays version information to standard error.
256 .It Fl x Ar log-options
257 Specify run-time logging options.
258 The options are a comma separated
259 list chosen from:
260 .Li fatal , error , user , warn , info , map , stats , all .
261 .It Fl C
262 Force
263 .Nm
264 to run on systems that cannot turn off the NFS attribute-cache.
265 Use of
266 this option on those systems is discouraged, as it may result in loss
267 or mis-delivery of mail.
268 The option is ignored on systems that can turn
269 off the attribute-cache.
270 .It Fl D Ar log-options
271 Select from a variety of debugging options.
272 Prefixing an
273 option with the string
274 .Dq Li no
275 reverses the effect of that option.
276 Options are cumulative.
277 The most useful option is
278 .Dq Li all .
279 Since this option is only used for debugging other options are not
280 documented here.
281 A fuller description is available in the program
282 source.
283 A
284 .Dv SIGUSR1
285 sent to
286 .Nm
287 will cause it to dump its internal password map to the file
288 .Pa /usr/tmp/hlfsd.dump.XXXXXX .
289 .It Fl P Ar password-file
290 Read the user-name, user-id, and home directory information from the file
291 .Ar password-file .
292 Normally,
293 .Nm
294 will use
295 .Xr getpwent 3
296 to read the password database.
297 This option allows you to override the
298 default database, and is useful if you want to map users' mail files to a
299 directory other than their home directory.
300 Only the username, uid, and
301 home-directory fields of the file
302 .Ar password-file
303 are read and checked.
304 All other fields are ignored.
305 The file
306 .Ar password-file
307 must otherwise be compliant with
308 .Ux
309 System 7 colon-delimited format
310 .Xr passwd 5 .
311 .El
312 .Sh FILES
313 .Bl -tag -width ".Pa /var/hlfs"
314 .It Pa /hlfs
315 directory under which
316 .Nm
317 mounts itself and manages the symbolic link
318 .Pa home .
319 .It Pa .hlfsdir
320 default sub-directory in the user's home directory, to which the
321 .Pa home
322 symbolic link returned by
323 .Nm
324 points.
325 .It Pa /var/hlfs
326 directory to which
327 .Pa home
328 symbolic link returned by
329 .Nm
330 points if it is unable to verify the that
331 user's home directory is accessible.
332 .El
333 .Sh SEE ALSO
334 .Xr mail 1 ,
335 .Xr getgrent 3 ,
336 .Xr getpwent 3 ,
337 .Xr mtab 5 ,
338 .Xr passwd 5 ,
339 .Xr amd 8 ,
340 .Xr cron 8 ,
341 .Xr mount 8 ,
342 .Xr sendmail 8 ,
343 .Xr umount 8
344 .Rs
345 .%T HLFSD: Delivering Email to Your $HOME
346 .%B Proc. LISA-VII, The 7th Usenix System Administration Conference
347 .%D November 1993
348 .Re
349 .Pp
350 .Dq am-utils
351 .Xr info 1
352 entry.
353 .Rs
354 .%A Erez Zadok
355 .%B "Linux NFS and Automounter Administration"
356 .%O ISBN 0-7821-2739-8
357 .%I Sybex
358 .%D 2001
359 .Re
360 .Pp
361 .Pa http://www.am-utils.org/
362 .Sh HISTORY
363 The
364 .Nm
365 utility appeared in
366 .Fx 3.0 .
367 .Sh AUTHORS
368 .An Erez Zadok Aq ezk@cs.sunysb.edu ,
369 Computer Science Department, Stony Brook University, Stony Brook, New York, USA.
370 .Pp
371 .An Alexander Dupuy Aq dupuy@smarts.com ,
372 System Management ARTS, White Plains, New York, USA.
373 .Pp
374 Other authors and contributors to am-utils are listed in the
375 .Pa AUTHORS
376 file distributed with am-utils.