Add new file `texinice.tex' to the distribution.
[become] / manual / become.texi
CommitLineData
7a53967a 1\input texinfo @c -*-texinfo-*-
2@c
f5050002 3@c $Id: become.texi,v 1.3 1998/01/20 14:37:43 mdw Exp $
7a53967a 4@c
5@c Documentation for `become'
6@c
69805471 7@c (c) 1998 EBI
7a53967a 8@c
9
10@c ----- Revision history ---------------------------------------------------
11@c
12@c $Log: become.texi,v $
f5050002 13@c Revision 1.3 1998/01/20 14:37:43 mdw
14@c Fix typo. Short form of `--preserve' should be `-e', not `-p'.
15@c
69805471 16@c Revision 1.2 1998/01/12 16:41:31 mdw
17@c Tidying for new release versions. Fix copyright date.
18@c
7a53967a 19@c Revision 1.1 1997/09/18 11:16:34 mdw
20@c Brand new Texinfo manual, with wider scope than the original LaTeX one.
21@c
22
23@c ----- Standard boilerplate -----------------------------------------------
24
25@c %**start of header
26@setfilename become
27@settitle Become
28@setchapternewpage odd
29@footnotestyle end
30@paragraphindent 0
31@iftex
32@c @smallbook
33@afourpaper
34@c @parindent=0pt
35@end iftex
36@c %**end of header
37
38@c ----- Useful macros ------------------------------------------------------
39
69805471 40@set version 1.2
7a53967a 41
42@c ----- Copyright matters --------------------------------------------------
43
44@c --- The `Info' version ---
45
46@ifinfo
47
48This file documents Become version @value{version}.
49
69805471 50Copyright (c) 1998 European Bioinformatics Institute.
7a53967a 51
52Permission is granted to make and distribute verbatim copies of this
53manual provided the copyright notice and this permission notice are
54preserved on all copies.
55
56@ignore
57Permission is granted to process this file through TeX and print the
58results, provided the printed document carries a copying permission
59notice identical to this one except for the removal of this paragraph
60(this paragraph not being relevant to the printed manual).
61
62@end ignore
63Permission is granted to copy and distribute modified versions of this
64manual under the conditions for verbatim copying, provided also that the
65sections entitled `Copying' and `GNU General Public License' are
66included exactly as in the original, and provided that the entire
67resulting derived work is distributed under the terms of a permission
68notice identical to this one.
69
70Permission is granted to copy and distribute translations of this manual
71into another language, under the above conditions for modified versions,
72except that this permission notice may be stated in a translation
73approved by the European Bioinformatics Institute.
74
75@end ifinfo
76
77@c --- Printed title page ---
78
79@titlepage
80
81@title The Become program
82@subtitle Become version @value{version}
83@author Mark Wooding (@email{mdw@@ebi.ac.uk})
84@page
85
86@vskip 0pt plus 1filll
87
88Copyright @copyright{} 1997 European Bioinformatics Institute.
89
90Permission is granted to make and distribute verbatim copies of this
91manual provided the copyright notice and this permission notice are
92preserved on all copies.
93
94Permission is granted to copy and distribute modified versions of this
95manual under the conditions for verbatim copying, provided also that the
96sections entitled `Copying' and `GNU General Public License' are
97included exactly as in the original, and provided that the entire
98resulting derived work is distributed under the terms of a permission
99notice identical to this one.
100
101Permission is granted to copy and distribute translations of this manual
102into another language, under the above conditions for modified versions,
103except that this permission notice may be stated in a translation
104approved by the European Bioinformatics Institute.
105
106@end titlepage
107
108
109@c --------------------------------------------------------------------------
110@ifinfo
111@node Top, Copying, (dir), (dir)
112@top Become
113
114
115Become is a system for managing shared accounts. It allows users to
116`become' other users in order to do useful work. It can be managed on a
117central server (or a small number of central servers), or it can run
118standalone.
119
120This file documents Become version @value{version}.
121
122@end ifinfo
123
124@menu
125* Copying:: Your rights to distribute and modify
126* Introduction:: A brief introduction to Become
127* Becoming someone else:: How to become somebody else
128* Administering Become:: How to maintain Become
129* Invoking Become:: Reference to Become's command line options
130
131 --- The Detailed Node Listing ---
132
133Becoming someone else
134
135* Terminology:: Some important terms defined
136* Environment:: Login styles and environment variables
137* Group permissions:: How Become handles group permissions
138* X authority:: Problems with X authority files
139* Running commands:: Running commands other than a shell
140
141How Become sets up the environment
142
143* New environment variables:: Become adds some useful environment variables
144* Login styles:: Choose how Become sets the environment
145* Tweaking the environment:: Altering individual environment variables
146* Removed variables:: Some environment variables aren't passed on
7a53967a 147
148Login styles
149
150* The preserve style:: Preserve the current environment
151* The set-user style:: Set user-specific variables (like @code{su})
152* The login style:: Clear the environment (like @code{login})
153
154How Become handles groups
155
156* Primary group selection:: Setting the new primary group
157* Subsidiary groups:: Setting subsidiary group memberships
158
159Considerations for X authority
160
161* The user-group method:: A secure method for handling X authority
162* Using xauth:: A less secure method, which might be easier
163
164Become administration
165
166* Configuration files:: Overview of Become's configuration files
167* Standalone or networked:: The two main types of Become installations
168* The configuration file:: How to define who's allowed to do what
69805471 169* Networked configuration:: Considerations for networked installations
7a53967a 170
171The configuration file
172
173* Basic syntax:: Quick overview of Become's syntax
174* Classes:: Defining classes of things
175* Predefined classes:: Become predefines some (maybe) useful classes
176* Allow statements:: Allow users to become other users
177* Other statements:: Some other useful statements
178* Example configuration file:: An example, showing a few features.
179* Complete grammar:: Complete grammar for Become config files
180
181Networked configuration
182
183* Choosing servers:: Which servers Become tries to talk to
184* Setting up keys:: How to generate keys for Become
185* Random number files:: Become keeps random number state around
186* Issuing a new key:: How to issue new keys without disruption
187
188Setting up keys
189
190* Invoking keygen:: How to use the @code{keygen} program
191
192Invoking Become
193
194* Becoming another user:: Options for becoming another user
195* Starting Become daemons:: Options for starting Become daemons
196* Debugging options:: Options to use when Become goes wrong
197@end menu
198
199@c --------------------------------------------------------------------------
200@node Copying, Introduction, Top, Top
201@unnumbered The GNU General Public License
202
203
204@include gpl.texi
205
206
207@c --------------------------------------------------------------------------
208@node Introduction, Becoming someone else, Copying, Top
209@unnumbered Introduction
210
211
212It's often useful to be able to share accounts between a number of
213users. For example, a group maintaining an externally visible service
214need to be able to start and kill the server process. Giving such a
215shared account a password is a fairly bad plan: such passwords tend not
216to get changed very often, and they have a habit of spreading beyond the
217group of legitimate users.
218
219The Become program presented here offers a solution to the problems of
220shared accounts. It allows the system adminstrator to define which
221users are allowed access to which accounts, on which hosts, and to
222execute which commands. Such shared accounts can then, in general, have
223their passwords removed.
224
225This coincidentally has another advantage: when `becoming' to a shared
226account, a user can retain her@footnote{Or his. I'll choose one or the
227other fairly randomly throughout this manual.} own environment, which
228she's carefully crafted and honed over the years, rather then being
229presented with some lowest-common-denominator setup which probably
230doesn't even use the right shell.
231
232The configuration file for Become can either be distributed to all the
233various hosts in a network or a few carefully set up and secure servers
234(@pxref{Standalone or networked}).
235
236
237@c --------------------------------------------------------------------------
238@node Becoming someone else, Administering Become, Introduction, Top
239@chapter Becoming someone else
240
241
242The simplest way to become someone else is to say
243
244@example
245become @var{user}
246@end example
247
248@noindent
249Become will check to see whether you're allowed to become @var{user}. If you
250are, it starts a shell process with the user-id set to @var{user}. Any
251commands you type are executed with the privileges of @var{user}.
252
253The full invocation is slightly more complicated:
254
255@example
256become [@var{option}@dots{}] [@var{env-var}@dots{}] @var{user} [@var{command} [@var{arg}@dots{}]]
257@end example
258
259Actually, the @var{option}s, @var{env-var}s and @var{user} can be in any
260order -- the important point is that all of them appear before the
261@var{command}, if there is one.
262
263@menu
264* Terminology:: Some important terms defined
265* Environment:: Login styles and environment variables
266* Group permissions:: How Become handles group permissions
267* X authority:: Problems with X authority files
268* Running commands:: Running commands other than a shell
269@end menu
270
271
272
273@node Terminology, Environment, Becoming someone else, Becoming someone else
274@section Terminology
275
276The following terms get used quite a bit in the following text:
277
278@table @asis
279@item request
280An invocation of Become, asking permission to become another user.
281
282@item old user
283The (real) user id of the process which invoked Become; usually, this will be
284your normal user id.
285
286@item target user
287The user whom you want to become, named in a request.
288@end table
289
290
291
292@node Environment, Group permissions, Terminology, Becoming someone else
293@section How Become sets up the environment
294
295There are thorny problems with handling the user's environment. It seems
296that (the author's initial assessment notwithstanding) there is no single
297best way of handling environment variables. As a result, Become can do just
298about everything you might want it to. This gets slightly complicated.
299Don't worry: it's not as hard as all that.
300
301@menu
302* New environment variables:: Become adds some useful environment variables
303* Login styles:: Choose how Become sets the environment
304* Tweaking the environment:: Altering individual environment variables
305* Removed variables:: Some environment variables aren't passed on
7a53967a 306@end menu
307
308
309@node New environment variables, Login styles, Environment, Environment
310@subsection Environment variables created by Become
311
312To help you (and, more importantly, your startup scripts) keep track of who
313you are, and who you were originally, Become adds some variables to the
314environment of any processes it starts.
315
316@table @code
317@item BECOME_USER
318The name of the target user (i.e., the user you are now). It might be useful
319to test this value in shell startup scripts, for example.
320
321@item BECOME_HOME
322The home directory of the target user. It can be handy to read startup and
323other configuration files from here.
324
325@item BECOME_OLD_USER
326The name of the user who invoked Become.
327
328@item BECOME_OLD_HOME
329The home directory of the `old' user.
330
331@item BECOME_ORIGINAL_USER
332This is intended to be the name you logged in with. If it's unset, Become
333sets it to be the same as @code{BECOME_OLD_USER}; otherwise it leaves it
334unchanged.
335
336@item BECOME_ORIGINAL_HOME
337This is intended to be the home directory you logged in with. If it's unset,
338Become sets it to be the same as @code{BECOME_OLD_HOME}; otherwise, it leaves
339it unchanged.
340@end table
341
342Don't even think about relying on these variables as a form of
343authentication. It won't work. They're provided only to help organise
344startup scripts.
345
346
347
348@node Login styles, Tweaking the environment, New environment variables, Environment
349@subsection Login styles
350
351Originally, Become always tried to preserve your environment. There's a
352rational explanation for this approach, which is given in the description of
353the `preserve' style below. Unfortunately, not everyone liked this
354approach. As a result, there's now a collection of different login styles.
355
356Login styles are selected by giving command line arguments:
357
358@table @code
f5050002 359@item -e
7a53967a 360@itemx --preserve
361The original style: try to preserve the existing user's environment as much
362as possible.
363
364@item -s
365@itemx --set-user
366Set some user-specific variables, like @code{USER} and @code{HOME} to reflect
367the target user rather than the old user. All other variables are preserved.
368
369@item -l
370@itemx --login
371Attempts to make the `become' process as much like a real login as possible.
372All variables not explicitly preserved are deleted, and a new environment is
373built, reflecting the target user.
374@end table
375
376The various styles, and the reasons behind them, are described below.
377
378@menu
379* The preserve style:: Preserve the current environment
380* The set-user style:: Set user-specific variables (like @code{su})
381* The login style:: Clear the environment (like @code{login})
382@end menu
383
384
385@node The preserve style, The set-user style, Login styles, Login styles
386@subsubsection The `preserve' login style
387
388You've spent many hours (days? weeks, even?) customising and honing your
389startup files, learning how to use your shell, and tweaking your favourite
390text editor until it's just the way you like it. So there can be few things
391more annoying than logging into a shared account to find out that the shell's
392wrong, your editor startup files are ignored, and nothing works quite the way
393you'd like it to. Typically you can't change this without annoying the other
394users: the result is a horrible compromise which dissatisfies everyone
395equally.
396
397The `preserve' style lets you take your standard environment with you when
398you become someone else. It tries hard not to modify any environment
399variables.
400
401Become starts your standard shell. If you have an environment variable
402@code{SHELL} defined, than this is executed. Otherwise, the shell specified
403in your entry in the password file is used. (You must have permission to
404execute whatever shell is chosen as the target user, or you'll just be given
405an error message.)
406
407Most programs look at environment variables in preference to looking up
408entries in the password database; e.g., they tend to use @code{USER} or
409@code{LOGNAME} for the user name, and @code{HOME} for your home directory.
410As a result, most programs will continue to find their configuration files in
411your home directory. Also, systems like RCS will use your real name, rather
412than the name of the user that you have become.
413
414To make best use of this login style, you may need to adjust your login
415scripts to notice when @code{BECOME_USER} is someone else, and read in
416appropriate definitions. For example, a `bash' user might say something like
417this in her @file{.bashrc}:
418
419@example
420if [ -n "$BECOME_HOME" ]; then . $BECOME_HOME/.bashrc
421@end example
422
423@noindent
424Similarly, a C shell user (either `tcsh' or `csh') might say something like
425
426@example
427if ($?BECOME_HOME) source $@{BECOME_HOME@}/.cshrc
428@end example
429
430(Note that plain Bourne shell users have a slight problem, because the Bourne
431shell only reads configuration things on a login, not when a normal
432interactive shell is started.)
433
434
435@node The set-user style, The login style, The preserve style, Login styles
436@subsubsection The `set-user' login style
437
438The author sees the main use of Become as allowing a user to acquire the
439privileges associated with a shared account without all the problems which
440shared accounts usually cause. To the author's way of thinking, one of the
441main problems is that your environment gets replaced by something alien and
442wrong. People disagree with me over this point, and for this reason the
443`set-user' style exists.
444
445The objective of `set-user' style is to behave similarly to the standard
446@code{su} command. Unless they've been preserved explicitly (@pxref{Tweaking
447the environment}), `set-user' mode sets the following environment variables:
448
449@table @code
450@item USER
451@itemx LOGNAME
452The name of the target user.
453
454@item HOME
455The home directory of the target user.
456
457@item SHELL
458The target user's default shell
459@end table
460
461The result of this is that the shell will read the target user's
462configuration files and present you with the environment set up there.
463
464I can't think of this style as being anything other than a migration aid
465while users are getting used to the freedom offered by the `preserve' style.
466
467
468@node The login style, , The set-user style, Login styles
469@subsubsection The `login' login style
470
471The `login' style causes Become to attempt to emulate a full login. Become
472will empty the environment of any variables which aren't explicitly preserved
473(@pxref{Tweaking the environment}). It will then set the following
474variables:
475
476@table @code
477@item USER
478@itemx LOGNAME
479The name of the target user.
480
481@item HOME
482The home directory of the target user.
483
484@item SHELL
485The target user's default shell
486
487@item MAIL
488An educated guess at where the target user's mailbox is.
489@end table
490
491By default, it runs the target user's shell, informing it that this is a
492login by setting the first character of @code{argv[0]} to @samp{-}.
493
494Become makes no entries in the @file{utmp} and @file{wtmp} files.
495
496
497
498@node Tweaking the environment, Removed variables, Login styles, Environment
499@subsection Tweaking individual environment variables
500
501Become's login styles provide a sort of course-grained control over the
502environment. Sometimes the control isn't fine enough. Become lets you tweak
503individual variables: you can set, delete, or preserve named variables from
504modification.
505
506There are three different things you can do with environment variables:
507
508@itemize @bullet
509@item
510Set a variable called @var{var} to a value @var{value}, by saying
511
512@example
513@var{var}=@var{value}
514@end example
515
516@noindent
517The variable is preserved from automatic deletion by the login-style rules.
518
519@item
520Delete a variable called @var{var} from the environment, by saying
521
522@example
523@var{var}-
524@end example
525
526@item
527Preserve a variable @var{var} from being deleted or modified by Become's
528login-style rules, but not change its value, by saying
529
530@example
531@var{var}!
532@end example
533@end itemize
534
535Just to try and make this slightly more sensible, here's an example. Suppose
536I want my @code{XAUTHORITY} variable to be set when I become user `fred':
537
538@example
539become XAUTHORITY=$HOME/.Xauthority fred
540@end example
541
542@noindent
543should do the job nicely. Similarly, if I want to log in as `bob', but don't
544want my @code{EDITOR} variable to change:
545
546@example
547become --login EDITOR! bob
548@end example
549
550@noindent
551(Of course, in this example, I'm at the mercy of Bob's shell init files as to
552whether his choice of editor overrides mine.)
553
554
555
69805471 556@node Removed variables, , Tweaking the environment, Environment
7a53967a 557@subsection Variables removed from the environment
558
559Some variables are removed from the environment which Become passes to a
560program for security reasons:
561
562@table @code
563@item LD_*
564@itemx SHLIB_PATH
565@itemx LIBPATH
566@itemx _RLD_*
567These variables are used on various systems as a search path for shared
568libraries. Clearly, by manipulating these search paths, an attacker could
569replace a standard shared library with one of his own.
570
571@item IFS
572The shell input field separator. Modifying this variable radically alters
573the way shells parse their inputs. (In particular, consider the case where
574@code{IFS} contains @samp{/}.)
575
576@item ENV
577@itemx BASH_ENV
578Used by some shells: it contains the name of a file to read on every shell
579invocation.
580
581@item KRB_CONF
582@ignore
583I'm not really sure what's going on here, so I'll just have to bluff my way
584through. I think that the following is more-or-less accurate, having browsed
585a small amount of Kerberos-related documentation.
586@end ignore
587Contains the name of a Kerberos configuration file. By manipulating this
588variable, an attacker could persuade a program to believe the wrong
589authentication server.
590@end table
591
592Also note that the @code{PATH} variable is modified: any items which aren't
593absolute pathnames are removed from the path. This check may become stricter
594in future, although getting the balance between security and convenience is
595particularly hard here.
596
597
598
7a53967a 599@node Group permissions, X authority, Environment, Becoming someone else
600@section How Become handles groups
601
602As well as handling changes of user id, Become also changes group ids.
603The exact changes Become makes are under user control.
604
605@menu
606* Primary group selection:: Setting the new primary group
607* Subsidiary groups:: Setting subsidiary group memberships
608@end menu
609
610
611@node Primary group selection, Subsidiary groups, Group permissions, Group permissions
612@subsection Choosing a new primary group
613
614By default, the primary group is chosen according to the login style
615(@pxref{Login styles}): the `preserve' style retains the current primary
616group, while `set-user' and `login' styles choose the target's primary group.
617
618You can override Become's default choice using the @code{--group} (@code{-g}
619for short) option:
620
621@example
622become --group=@var{group} @dots{}
623@end example
624
625The chosen @var{group} may be either a group name or a numeric gid. The
626group must be one of the following:
627
628@itemize @bullet
629@item
630Your current primary group.
631@item
632One of your current subsidiary groups.
633@item
634The target user's primary group.
635@item
636One of the target user's subsidiary groups.
637@end itemize
638
639Become will raise an error if this isn't the case.
640
641
642@node Subsidiary groups, , Primary group selection, Group permissions
643@subsection Handling subsidiary group memberships
644
645Subsidiary group memberships are a powerful tool for managing permissions
646under Unix. Traditionally, they tend to be tied to particular users. Become
647tries to be sightly more intelligent about group memberships.
648
649Become has a concept of @dfn{group style}, analogous to login style
650(@pxref{Login styles}). The styles are selected by giving command line
651arguments:
652
653@table @code
654@item -k
655@itemx --keep-groups
656Retain the existing group memberships; don't add any new groups.
657
658@item -m
659@itemx --merge-groups
660Merge group memberships of the target user with the exiting memberships.
661
662@item -r
663@itemx --replace-groups
664Replace the existing group memberships with the target user's memberships.
665@end table
666
667Again, the defaults are dependent on the chosen login style. Both `preserve'
668and `set-user' merge group memberships; the `login' style replaces the set of
669groups.
670
671Note that you can do perverse things like replace all the subsidiary groups
672but retain your primary group (using the @code{--group} option;
673@pxref{Primary group selection}) if you like: Become won't try to stop you.
674
675
676
677@node X authority, Running commands, Group permissions, Becoming someone else
678@section Considerations for X authority
679
680Other users can't read your @file{.Xauthority} file, if you have one. This
681is as it should be: anyone who can read it can connect to your X server and
682read or generate events. However, once you've become another user, you can't
683open any X windows; this can be annoying if your favourite editor is X-based.
684
685There are two basic approaches. Either you can send the shared account a
686copy of your display's magic cookie, or you can retain permission to read the
687cookie file.
688
689@menu
690* The user-group method:: A secure method for handling X authority
691* Using xauth:: A less secure method, which might be easier
692@end menu
693
694
695@node The user-group method, Using xauth, X authority, X authority
696@subsection The user-group method for handling X authority
697
698This method is completely secure only if your site uses the `user-group'
699system. In this system, each user is allocated a group containing only that
700user. Usually this is made the user's default primary group, although that's
701not necessary here.
702
703When you start a new X session, ensure that your cookie file is owned by you
704and your private group. Change the file's permissions so that it's group
705readable. Finally, ensure that your private group is retained when you
706become someone else (@pxref{Group permissions}), and that the
707@code{XAUTHORITY} variable is set correctly.
708
709The following Bourne shell code in a @file{.xinitrc} should do most of the
710work:
711
712@example
713XAUTHORITY="$HOME/.Xauthority"
714export XAUTHORITY
715chgrp mygroup $XAUTHORITY
716chmod 640 $XAUTHORITY
717@end example
718
719@noindent
720In a C shell, this becomes
721
722@example
723setenv XAUTHORITY $@{HOME@}/.Xauthority
724chgrp mygroup $XAUTHORITY
725chmod 640 $XAUTHORITY
726@end example
727
728The @code{XAUTHORITY} file is preserved by both the `preserve' and `set-user'
729login styles, so this isn't a problem. You can now become other users, and
730your X permissions will follow you around correctly.
731
732It's probably worth noting that the @code{xauth} program annoyingly resets
733the permissions on the cookie file every time it writes to it. This will be
734particularly irritating if you use @code{ssh}'s X forwarding capabilities,
735because every @code{ssh} connection will reset the permissions. You can deal
736with this problem by putting a line
737
738@example
739chmod 640 $@{XAUTHORITY-$HOME/.Xauthority@} 2>/dev/null
740@end example
741
742@noindent
743in your @file{.bashrc} or @file{.profile} (for Bourne-like shell users) or
744
745@example
746if ($?XAUTHORITY) then
747 chmod 640 $XAUTHORITY >&/dev/null
748else
749 chmod 640 $@{HOME@}/.Xauthority >&/dev/null
750endif
751@end example
752
753@noindent
754in @file{.cshrc} for C shell users.
755
756
757
758@node Using xauth, , The user-group method, X authority
759@subsection The `xauth' method for handling X authority
760
761This method sends your X cookie to the shared account. It's therefore
762intrinsically dangerous: you must be able to trust the other users of the
763shared account not to take undue advantage of this situation.
764
765The following (Bourne) shell snippet illustrates how you might send an
766authorisation cookie to the shared account, to allow it to connect to your
767display:
768
769@example
770if test -n "$BECOME_HOME"; then
771 XAUTHORITY="$BECOME_HOME/.Xauthority"; export XAUTHORITY
772elif test -n "$DISPLAY" && test -z "done_xauth_cookie"; then
773 case "$DISPLAY" in
774 :0.0) display=`hostname`:0.0 ;;
775 *) display="$DISPLAY" ;;
776 esac
777 xauth extract - $display | \
778 become someone -c 'xauth -f $BECOME_HOME/.Xauthority merge -'
779 done_xauth_cookie=yes; export done_xauth_cookie
780fi
781@end example
782
783The equivalent C shell code is
784
785@example
786if ($?BECOME_HOME) then
787 setenv XAUTHORITY "$@{BECOME_HOME@}/.Xauthority
788else if ($?DISPLAY && ! $?done_xauth_cookie) then
789 if ($DISPLAY == :0.0) then
790 set display="`hostname`:0.0"
791 else
792 set display="$DISPLAY"
793 endif
794 xauth extract - $display | \
795 become someone -c 'xauth -f $BECOME_HOME/.Xauthority merge -'
796endif
797@end example
798
799It works as follows:
800
801@itemize @bullet
802@item
803If the variable @code{BECOME_HOME} is set, then we're probably really someone
804else, so point to the shared account's authority file.
805
806@item
807Otherwise, check to see whether we have a display, and the authorisation has
808not already been sent. If this is so, resolve a local display name into a
809remote one (just in case) and then send it to the shared account.
810@end itemize
811
812
813
814@node Running commands, , X authority, Becoming someone else
815@section Executing specific commands
816
817As well as starting shells, Become can run single commands. This can be
818useful in two ways:
819
820@itemize @bullet
821@item
822It enables Become to be used in scripts.
823
824@item
825It allows access to shared accounts to be controlled on the basis of the
826command to be run.
827@end itemize
828
829To run a command as another user, say:
830
831@example
832become @var{user} @var{command} [@var{argument}@dots{}]
833@end example
834
835If the request is granted, Become runs @var{command}, passing it any
836arguments following the command name. Become doesn't run a shell, so there's
837no extra escaping which needs to be done.
838
839If you really want to run a shell command as another user, you can use the
840@code{-c} option:
841
842@example
843become @var{user} -c @var{shell-command}
844@end example
845
846This is exactly equivalent to
847
848@example
849become @var{user} /bin/sh -c @var{shell-command}
850@end example
851
852in every way. In particular, you must have permission to run @file{/bin/sh}
853as @var{user} for it to work: Become doesn't attempt to interpret the shell
854command in any way. Also note that Become always uses the Bourne shell,
855regardless of your current shell preference, or @var{user}'s default shell.
856(This is done to provide a stable programming interface which works
857irrespective of changes to the shared account's configuration.)
858
859
860@c --------------------------------------------------------------------------
861@node Administering Become, Invoking Become, Becoming someone else, Top
862@chapter Become administration
863
864
865This chapter will explain how Become is administrated and maintained.
866
867@menu
868* Configuration files:: Overview of Become's configuration files
869* Standalone or networked:: The two main types of Become installations
870* The configuration file:: How to define who's allowed to do what
871* Networked configuration:: Considerations for networked installations
872@end menu
873
874
875
876@node Configuration files, Standalone or networked, Administering Become, Administering Become
877@section Configuration files
878
879Become keeps its configuration and administrative files in a directory
880usually named @file{/etc/become}, although this can be changed with the
881@code{--with-etcdir} option to the configuration script when you build
882Become.
883
884Not all of the files are needed on all machines.
885
886@table @file
887@item become.conf
888The main configuration file, containing a description of which users are
889allowed to become which other users, where, and what they're allowed to run
890when they get there. Only needed on servers or standalone machines.
891
892@item become.server
893A list of servers to contact. Only needed on client machines.
894
895@item become.key
896The encryption key to use when sending requests to servers. Needed on
897clients and servers, but not on standalone machines.
898
899@item become.pid
900The process id of the server. Created automatically by Become's server when
901in starts up.
902
903@item become.random
904Contains state information for Become's random number generator. Created
905automatically if it doesn't exist.
906@end table
907
908
909@node Standalone or networked, The configuration file, Configuration files, Administering Become
910@section Installation types
911
912
913Become can be installed in two different ways, depending on how you want to
914administer it:
915
916@itemize @bullet
917@item
918In a @dfn{standalone} installation, each Become request is dealt with
919locally: the program reads the configuration file, and decides whether it
920should grant or deny permission.
921
922Standalone installations don't depend on servers being available, or even on
923the existance of a network. They're useful for small sites, or sites with a
924small number of users. The disadvantages are that reading the configuration
925file takes a while, so the program doesn't feel as responsive as it should,
926and ensuring that all the hosts' configuration files are synchronised becomes
927difficult when you have lots of machines.
928
929@item
930In a @dfn{network} installation, any Become requests are sent on to a
931collection of servers. The servers analyse the request and send a reply back
932which either authorises or forbids access.
933
934A networked installation clearly depends on the servers' reliability. The
935client reacts only to the first reply it receives, so as long as there is one
936server running, everything should continue as normal.
937
938A networked installation is useful when you have a large number of client
939machines, particularly ones which may not be awake all the time. The full
940configuration file only needs to be installed on a small number of servers;
941the clients require only a list of server machines to contact, and an
942encryption key to use.
943@end itemize
944
945
946
947@node The configuration file, Networked configuration, Standalone or networked, Administering Become
948@section The configuration file
949
950The main configuration file, usually called @file{/etc/become/become.conf},
951contains all the rules which Become uses to decide whether to grant or deny
952requests. It may also contain additional information for the benefit of
953Become daemons, if you're using a networked installation.
954
955@menu
956* Basic syntax:: Quick overview of Become's syntax
957* Classes:: Defining classes of things
958* Predefined classes:: Become predefines some (maybe) useful classes
959* Allow statements:: Allow users to become other users
960* Other statements:: Some other useful statements
961* Example configuration file:: An example, showing a few features.
962* Complete grammar:: Complete grammar for Become config files
963@end menu
964
965
966@node Basic syntax, Classes, The configuration file, The configuration file
967@subsection Basic configuration file syntax
968
969The configuration file consists of a sequence of statements, each terminated
970by a semicolon.
971
972Comments begin with a @samp{#} character, and continue to the end of the
973line. This is the only time newlines behave specially: newlines behave just
974like any other whitespace characters within statements.
975
976Strings are enclosed in double-quote characters (@samp{"}). Within a string,
977a backslash causes the following character to be treated literally, whatever
978it may be (including quotes, backslashes and newlines).
979
980Names begin with an alphabetic character or an underscore, and consist of
981letters, digits and underscores.
982
983In general, ...
984
985
986
987@node Classes, Predefined classes, Basic syntax, The configuration file
988@subsection Classes
989
990A @dfn{class} in Become is a set of users, hosts or commands. You can define
991and name your own classes using statements of the form:
992
993@example
994user @var{name} = @var{class-expr} ;
995command @var{name} = @var{class-expr} ;
996host @var{name} = @var{class-expr} ;
997@end example
998
999A @var{class-expr} is an expression defining a class. You can build a
1000complex class out of simple classes using the operators (in ascending
1001precedence order) @samp{,}, @samp{-}, @samp{|} and @samp{&}, which represent
1002the set options `union', `subtraction', `union' (again!), and `intersection'.
1003Subexpressions can be parenthesised to override the default precedence.
1004Once a class name has been defined, as shown above, it can be used in
1005subsequent class expressions.
1006
1007A single user may be designated by either a user name (in quotes) or an
1008integer uid. Commands and hosts may be designated by quoted strings which
1009may contain wildcards. Host strings are matched against both numeric (dotted
1010quad) IP addresses and the reverse-resolved hostname. Command strings are
1011matched against the absolute pathname of the command the user wants to
1012execute.
1013
1014
1015
1016@node Predefined classes, Allow statements, Classes, The configuration file
1017@subsection Predefined classes
1018
1019In an attempt to make life a bit easier, Become creates a collection of
1020predefined classes.
1021
1022The standard classes @code{all} and @code{none} match anything and nothing
1023respectively. The @code{all} class is useful in some contexts: it gives you
1024a way of saying `everything except@dots{}', for example:
1025
1026@example
1027user MUNDANES = all - SYSHACKS;
1028@end example
1029
1030@noindent
1031The @code{none} class isn't particularly useful in itself. It's there for
1032completeness.
1033
1034Become also defines some other classes:
1035
1036@itemize @bullet
1037@item
1038For each username @var{user}, Become adds a class called @samp{@var{user}}
1039which matches just that user.
1040
1041@item
1042For each group name @var{group}, Become creates a class called
1043@samp{@var{group}} which matches any user who is a member of that group.
1044
1045@item For each netgroup @var{netgroup}, Become creates two classes:
1046@samp{u_@var{netgroup}} which matches any user listed in the netgroup, and
1047@samp{h_@var{netgroup}} which matches any host listed in the netgroup.
1048@end itemize
1049
1050If a name is used for both a user @emph{and} a group, then corresponding
1051class ends up containing the user together with all of the group members.
1052For this reason, it's probably better to use the predefined classes for
1053groups rather than individual users -- use quoted user names for individual
1054users.
1055
1056Note that users and groups are read using the standard @code{get*ent} calls
1057@emph{and} directly from the NIS server (if there is one). The idea here is
1058that a Become server can be run on a machine which allows restricted logins.
1059It still needs to know about all the users known to the outside world.
1060
1061Netgroups are read only from the NIS servers. In particular, although GNU
1062systems allow netgroup databases to be stored in local files, Become wonn't
1063read them because there's no defined interface for enumerating netgroups.
1064
1065
1066@node Allow statements, Other statements, Predefined classes, The configuration file
1067@subsection Allow statements
1068
1069Defining classes is just a means to an end. The end is to specify which
1070users are allowed to do what, where, and as whom. This is done with an
1071@code{allow} statement:
1072
1073@example
1074allow [[@var{host-class}]] [@var{user-class}] -> [@var{user-class}] [ : @var{command-class}]
1075@end example
1076
1077(The @var{host-class} is optional, but must be enclosed in square brackets if
1078present.)
1079
1080The four classes in an allow statement are called, respectively, the `host',
1081the `to-user', the `from-user' and the `command'. Any of the four classes
1082may be omitted, and an omitted class defaults to `all'.
1083
1084When a request is received, Become checks the fields in the request against
1085the classes in each allow statement of the configuration file. If a
1086statement matches, the request is granted; if there are no full matches,
1087the request is denied.
1088
1089
1090@node Other statements, Example configuration file, Allow statements, The configuration file
1091@subsection Other statements
1092
1093Two other statement types are defined. They only have an effect on Become in
1094daemon mode:
1095
1096@example
1097port @var{port} ;
1098keyfile @var{key-file} ;
1099@end example
1100
1101@noindent
1102The @code{port} statement specifies the port to which the server should
1103listen; the @var{port} may be be an integer or a quoted service name. The
1104@code{keyfile} statement instructs Become to use the key from the file named
1105@var{key-file}, which must be a quoted string.
1106
1107
1108@node Example configuration file, Complete grammar, Other statements, The configuration file
1109@subsection An example configuration file
1110
1111@example
1112#
1113# become.conf
1114#
1115# Example configuration file
1116#
1117
1118allow wheel -> "root";
1119
1120user NEWS = "fred", "jim";
1121allow NEWS -> "news";
1122
1123user HTTP = "jim", "bob";
1124allow HTTP -> "httpd" : "/bin/kill", "/etc/init.d/httpd";
1125@end example
1126
1127
1128@node Complete grammar, , Example configuration file, The configuration file
1129@subsection Complete grammar for configuration files
1130
1131@format
1132@var{file} ::= @var{file} @var{statement}
1133
1134@var{statement} ::= @var{class-def}
1135 | @var{allow-spec}
1136 | @var{port-spec}
1137 | @var{key-spec}
1138
1139@var{class-def} ::= @samp{user} @var{name} = @var{class-expr} @samp{;}
1140 | @samp{command} @var{name} = @var{class-expr} @samp{;}
1141 | @samp{host} @var{name} = @var{class-expr} @samp{;}
1142
1143@var{allow-spec} ::= @samp{allow} @var{opt-host-spec} @var{opt-user-spec}
1144 @samp{->} @var{opt-user-spec} @var{opt-command-spec} @samp{;}
1145
1146@var{opt-host-spec} ::= @samp{[} @var{class-expr} @samp{]}
1147 | @var{empty}
1148
1149@var{opt-user-spec} ::= @var{class-expr}
1150 | @var{empty}
1151
1152@var{opt-command-spec} ::= @samp{:} @var{class-expr}
1153 | @var{empty}
1154
1155@var{port-spec} ::= @samp{port} @var{integer} @samp{;}
1156 | @samp{port} @var{string} @samp{;}
1157
1158@var{key-spec} ::= @samp{keyfile} @var{string} @samp{;}
1159
1160@var{class-expr} ::= @var{class-diff-expr}
1161 | @var{class-expr} @samp{,} @var{class-diff-expr}
1162
1163@var{class-diff-expr} ::= @var{class-isect-expr}
1164 | @var{class-diff-expr} @samp{-} @var{class-union-expr}
1165
1166@var{class-union-expr} ::= @var{class-isect-expr}
1167 | @var{class-union-expr} @samp{|} @var{class-isect-expr}
1168
1169@var{class-isect-expr} ::= @var{class-primary}
1170 | @var{class-isect-expr} @samp{&} @var{class-primary}
1171
1172@var{class-primary} ::= @samp{(} @var{class-expr} @samp{)}
1173 | @var{string}
1174 | @var{integer}
1175
1176@var{integer} ::= one or more digits (@samp{0}--@samp{9})
1177
1178@var{name} ::= an alphabetic character or underscore, followed by zero or
1179 more alphanumeric characters or underscores
1180
1181@var{string} ::= @samp{"} @var{string-chars} @samp{"}
1182
1183@var{string-chars} ::= @var{string-chars} @var{string-char}
1184 | @var{empty}
1185
1186@var{string-char} ::= a @samp{\} followed by any character
1187 | any character other than @samp{"}, @samp{\} or newline
1188
1189@var{empty} ::=
1190@end format
1191
1192
1193@node Networked configuration, , The configuration file, Administering Become
1194@section Networked configuration
1195
1196If you're planning to use Become in a standalone way, you can skip this
1197section.
1198
1199@menu
1200* Choosing servers:: Which servers Become tries to talk to
1201* Setting up keys:: How to generate keys for Become
1202* Random number files:: Become keeps random number state around
1203* Issuing a new key:: How to issue new keys without disruption
1204@end menu
1205
1206
1207@node Choosing servers, Setting up keys, Networked configuration, Networked configuration
1208@subsection Choosing servers
1209
1210Become notices that it's meant to send requests to a server if it finds a
1211@file{become.server} file. This file contains entries of the form
1212
1213@example
1214@var{host} [: @var{port}]
1215@end example
1216
1217If the @var{port} is omitted, Become chooses a port by looking at the
1218services database for a service which matches the name by which Become was
1219invoked: normally this will be @samp{become}.
1220
1221Become sends a request to all of the servers and believes the first valid
1222reply it receives. Since servers ignore requests they believe to be invalid,
1223this enables you to change Become's key without disrupting service
1224(@pxref{Issuing a new key}).
1225
1226If you're using NIS, you should try to ensure that Become servers runs only
1227on NIS servers; the NIS master is probably a good choice.
1228
1229Become isn't particularly processor-intensive, and doesn't seem to require
1230very much memory.
1231
1232
1233@node Setting up keys, Random number files, Choosing servers, Networked configuration
1234@subsection Setting up keys
1235
1236Communication between Become clients and the server is encrypted to ensure
1237that it's not feasible to gain unauthorised privilege by subverting the
1238network. Become uses simple symmetric cryptography -- it's not necessary to
1239use complicated public key techniques in this case.
1240
1241Each client machine, and the server, must have a copy of the same key. The
1242key is usually stored in @file{/etc/become/become.key}. Become's keys are
1243128 bits long.
1244
1245The key file can be generated using the @code{keygen} program, supplied. The
1246command
1247
1248@example
1249keygen --bits=128 --output=/etc/become/become.key
1250@end example
1251
1252@noindent
1253generates a 128-bit key and writes it to @file{/etc/become/become.key} in a
1254format which Become can read.
1255
1256The @code{keygen} program works by measuring the time between keystrokes. It
1257also tries to obtain some randomness from the environment, and mixes all of
1258this noise together before it outputs the key file.
1259
1260Having generated a key, it must be distributed to all of the other hosts
1261which will use this server. The author recommends using the @code{scp}
1262program, distributed with the @code{SSH} (Secure Shell) package, for doing
1263this.
1264
1265Being able to read a key file enables a user to assume root privileges. The
1266author recommends that only the super-user be able to read key files.
1267
1268@menu
1269* Invoking keygen:: How to use the @code{keygen} program
1270@end menu
1271
1272
1273@node Invoking keygen, , Setting up keys, Setting up keys
1274@subsubsection Invoking @code{keygen}
1275
1276@example
1277keygen [@var{option}@dots{}]
1278@end example
1279
1280By default, @code{keygen} generates a 128-bit key, and writes it to standard
1281output in a hexadecimal format. This behaviour can be modified by passing
1282options:
1283
1284@table @code
1285@item -h
1286@itemx --help
1287Write a summary of @code{keygen}'s usage instructions to standard output and
1288exits.
1289
1290@item -b @var{bits}
1291@itemx --bits=@var{bits}
1292Generate a @var{bits}-bit key, instead of the default 128 bits.
1293
1294@item -o @var{file}
1295@itemx --output=@var{file}
1296Write the key to @var{file} instead of standard output.
1297
1298@item -f @var{format}
1299@itemx --format=@var{format}
1300Set the format in which @code{keygen} outputs the generated key. If the
1301@var{format} is @samp{hex} (or @samp{tx}), the key is output in Become's
1302hexadecimal format; @samp{binary} writes the key as a raw binary dump; and
1303@samp{base64} writes the key using the Base64 encoding.
1304@end table
1305
1306
1307
1308@node Random number files, Issuing a new key, Setting up keys, Networked configuration
1309@subsection Random number files
1310
1311Become uses random numbers to generate session keys when it's communicating
1312with a server. When it's finished, it stores the state of its random number
1313generator in a file, usually @code{/etc/become/become.random}. If this file
1314doesn't exist, Become creates it automatically, using noise collected from
1315the environment. It's probably not worth your while creating randomness
1316files by hand.
1317
1318
1319@node Issuing a new key, , Random number files, Networked configuration
1320@subsection Issuing a new key
1321
1322When you're sending out a new key, you run a risk of disrupting service. The
1323server reads a new key; the clients still have the old one.
1324
1325The author's recommendation is to run two servers. Update the key on one.
1326Then send the new key to all of the clients. Finally, update the key on the
1327other server. Because of the way Become works, a client will always get a
1328response from one of the servers, depending on whether the new key has
1329reached it yet.
1330
1331A similar method is handy if Become's protocol ever changes. (This is quite
1332likely at the moment. The current protocol doesn't include any version
1333information, and the MAC isn't as good as it could be.)
1334
1335
1336@c --------------------------------------------------------------------------
1337@node Invoking Become, , Administering Become, Top
1338@chapter Invoking Become
1339
1340
1341This chapter provides an exhaustive description of Become's command line
1342options, organised in a reference-manual sort of way.
1343
1344@menu
1345* Becoming another user:: Options for becoming another user
1346* Starting Become daemons:: Options for starting Become daemons
1347* Debugging options:: Options to use when Become goes wrong
1348@end menu
1349
1350
1351
1352@node Becoming another user, Starting Become daemons, Invoking Become, Invoking Become
1353@section Becoming another user
1354
1355@subsection Synopsis
1356
1357@example
1358become [@var{option}@dots{}] [@var{env-var}@dots{}] @var{user} [@var{command} [@var{argument}@dots{}]]
1359@end example
1360
1361Actually, you can put the @var{option}s, @var{env-var}s and @var{user} in any
1362order you like; the important thing is that all of them appear before the
1363command, if any.
1364
1365
1366@subsection Usage
1367
1368The @var{option}s appropriate for this mode are as follows:
1369
1370@table @code
1371@item -h
1372@itemx --help
1373Display a (fairly verbose) help message describing the various command line
1374options and exits successfully.
1375
1376@item -u
1377@itemx --usage
1378Display a terse summary of the command line options and exits successfully.
1379
1380@item -v
1381@itemx
1382Display's Become's version number and exits successfully.
1383
1384@item -e
1385@item --preserve-environment
1386Selects the `preserve' login style (@pxref{The preserve style}). All
1387environment variables are preserved. The default command is the current
1388user's own shell. The default primary group becomes the current primary
1389group; the default group style is set to `merge'.
1390
1391@item -s
1392@itemx --su
1393@itemx --set-user
1394Selects the `set-user' login style (@pxref{The set-user style}). Most
1395environment variables are preserved, but @code{USER}, @code{LOGNAME},
1396@code{HOME} and other user-specific variables are altered to reflect the
1397target user's configuration. The default command is the target user's shell.
1398The default primary group becomes the target user's primary group; the
1399default group style is set to `merge'.
1400
1401@item -l
1402@itemx --login
1403Selects the `login' login style (@pxref{The login style}). The environment
1404is cleared and rebuilt, in a similar way to the behaviour of @code{login}.
1405The default command is the target user's shell. The default primary group
1406becomes the target user's primary group; the default group style is set to
1407`replace'.
1408
1409@item -g @var{group}
1410@itemx --group=@var{group}
1411Selects @var{group} as the primary group; it may be either a group name or a
1412numeric group id. Note that @var{group} must be the primary group or
1413a subsidiary group of either the current user or the target user.
1414
1415@item -k
1416@itemx --keep-groups
1417Selects the `keep' group style (@pxref{Subsidiary groups}). The current set
1418of subsidiary group memberships are passed on unchanged.
1419
1420@item -m
1421@itemx --merge-groups
1422Selects the `merge' group style (@pxref{Subsidiary groups}). The current set
1423of subsidiary group memberships are merged with the subsidiary groups of the
1424target user.
1425
1426@item -r
1427@itemx --replace-groups
1428Selects the `replace' group style (@pxref{Subsidiary groups}). The target
1429user's subsidiary group memberships are passed on; the current subsidiary
1430groups are discarded.
1431
1432@item -c @var{shell-cmd}
1433@itemx --command=@var{shell-cmd}
1434Sets the @var{command} and @var{argument}s to invoke
1435@code{/bin/sh -c @var{shell-cmd}}; i.e., to execute a Bourne shell command
1436instead of just @code{exec}ing a program. Note that permissions are checked
1437for executing the Bourne shell @code{/bin/sh}; the contents of the
1438@var{shell-cmd} are not inspected.
1439@end table
1440
1441The @var{env-var} arguments fine-tune the environment passed to the command.
1442Each @var{env-var} setting must be one of the following:
1443
1444@table @code
1445@item @var{var}=@var{value}
1446Assign the variable named @var{var} the value @var{value}. Protect the
1447variable @var{var} from modifications by the login style.
1448
1449@item @var{var}!
1450Protect the variable @var{var} from modifications by the login style, but
1451don't change its value.
1452
1453@item @var{var}-
1454Remove the variable @var{var} from the environment; do not pass it on.
1455@end table
1456
1457The @var{user} specifies the user as whom the @var{command} should be
1458executed (i.e., the @dfn{target user}). It may be a user name or a numeric
1459user id.
1460
1461The @var{command} specifies a command to execute. If @var{command} does not
1462contain a path, it is looked for using the current @code{PATH} environment
1463variable. The resulting pathname is canonified if necessary, to produce an
1464absolute pathname. Note that symbolic links are @emph{not} resolved -- this
1465prevents an attack whereby a user could invoke a program, passing it an
1466unusual @code{argv[0]} which might cause unusual behaviour.
1467
1468The @var{command} name is used both as the command to execute and passed to
1469the command as @code{argv[0]}. It is not possible to specify an alternative
1470calue to be passed as @code{argv[0]}. Subsequent arguments, if supplied, are
1471passed as @code{argv[1]} upwards.
1472
1473If no @var{command} is given, a shell is invoked; the particulars of the
1474shell are determined by the login style (see above).
1475
1476The @var{command} is executed as follows:
1477
1478@itemize @bullet
1479@item
1480The subsidiary groups are chosen as determined by the group style.
1481@item
1482The real and effective gids are set.
1483@item
1484The real and effective uids are set.
1485@item
1486The @var{command} is called using the standard @code{execve} system call.
1487@end itemize
1488
1489
1490
1491@node Starting Become daemons, Debugging options, Becoming another user, Invoking Become
1492@section Starting Become daemons
1493
1494@subsection Synopsis
1495
1496@example
1497become --daemon [@var{option}@dots{}]
1498@end example
1499
1500
1501@subsection Usage
1502
1503The following options are appropriate to this mode:
1504
1505@table @code
1506@item -h
1507@itemx --help
1508Display a (fairly verbose) help message describing the various command line
1509options and exits successfully.
1510
1511@item -u
1512@itemx --usage
1513Display a terse summary of the command line options and exits successfully.
1514
1515@item -v
1516@itemx
1517Display's Become's version number and exits successfully.
1518
1519@item -d
1520@itemx --daemon
1521Start a Become server, instead of processing a request. Become will read its
1522command line options, read in the configuration file (and verify that it's
1523correct) and then fork into the background to wait for incoming requests.
1524Become relinquishes all setuid privileges (by setting all uids to the real
1525uid) when it enters daemon mode. It is therefore only really useful to run a
1526daemon as the superuser.
1527
1528@item -p @var{port}
1529@itemx --port=@var{port}
1530Listen for requests on @var{port}. This option is overridden by the
1531@code{port} option in the configuration file.
1532
1533@item -f @var{file}
1534@itemx --config-file=@var{file}
1535Read configuration from @var{file}, instead of the default (usually
1536@file{/etc/become/become.conf}).
1537@end table
1538
1539The syntax of the configuration file is described in @ref{The configuration
1540file}.
1541
1542
1543@node Debugging options, , Starting Become daemons, Invoking Become
1544@section Debugging options
1545
1546Some options are only useful when trying to find out why Become is
1547misbehaving. Of course, this never happens, so here are the options which
1548you won't need to use:
1549
1550@table @code
1551@item -T[@var{file}]
1552@itemx --trace[=@var{file}]
1553Write trace information to @var{file} (or to standard output, if no
1554@var{file} is specified). You must be able to create the file and open it
1555for writing.
1556
1557@item -L[@var{feature}...]
1558@itemx --trace-level[=@var{feature}]
1559Selects which features Become ought to trace. Each feature is allocated a
1560letter; simply string together the letters for the features you want to
1561debug. The letters @samp{D} and @samp{A} stand respectively for `default'
1562and `all' features; you can subtract from them by saying, for example,
1563@samp{A-xyz} to select all features except @samp{x}, @samp{y} and @samp{z}.
1564The exact list of features supported at any one time can be listed by giving
1565the @code{--trace-level} option without an argument.
1566
1567@item -I @var{user}
1568@itemx --impersonate=@var{user}
1569Pretend to be @var{user} instead of yourself when the request is checked.
1570This option can only be used if it wasn't disabled at compile-time and if
1571Become is not running setuid. Even so, Become will only inform you of the
1572outcome; it will not execute any commands.
1573@end table
1574
1575
1576
1577@c --------------------------------------------------------------------------
1578
1579@c --- No index yet ---
1580@c
1581@c @node Concept index, , Invoking Become, Top
1582@c @unnumbered Concept index
1583@c @printindex cp
1584@c
1585@c @contents
1586
1587@bye
1588
1589@c ----- That's all, folks --------------------------------------------------