| 1 | .\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) |
|---|
| 2 | .\" |
|---|
| 3 | .\" Standard preamble: |
|---|
| 4 | .\" ======================================================================== |
|---|
| 5 | .de Sp \" Vertical space (when we can't use .PP) |
|---|
| 6 | .if t .sp .5v |
|---|
| 7 | .if n .sp |
|---|
| 8 | .. |
|---|
| 9 | .de Vb \" Begin verbatim text |
|---|
| 10 | .ft CW |
|---|
| 11 | .nf |
|---|
| 12 | .ne \\$1 |
|---|
| 13 | .. |
|---|
| 14 | .de Ve \" End verbatim text |
|---|
| 15 | .ft R |
|---|
| 16 | .fi |
|---|
| 17 | .. |
|---|
| 18 | .\" Set up some character translations and predefined strings. \*(-- will |
|---|
| 19 | .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left |
|---|
| 20 | .\" double quote, and \*(R" will give a right double quote. \*(C+ will |
|---|
| 21 | .\" give a nicer C++. Capital omega is used to do unbreakable dashes and |
|---|
| 22 | .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, |
|---|
| 23 | .\" nothing in troff, for use with C<>. |
|---|
| 24 | .tr \(*W- |
|---|
| 25 | .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' |
|---|
| 26 | .ie n \{\ |
|---|
| 27 | . ds -- \(*W- |
|---|
| 28 | . ds PI pi |
|---|
| 29 | . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch |
|---|
| 30 | . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch |
|---|
| 31 | . ds L" "" |
|---|
| 32 | . ds R" "" |
|---|
| 33 | . ds C` "" |
|---|
| 34 | . ds C' "" |
|---|
| 35 | 'br\} |
|---|
| 36 | .el\{\ |
|---|
| 37 | . ds -- \|\(em\| |
|---|
| 38 | . ds PI \(*p |
|---|
| 39 | . ds L" `` |
|---|
| 40 | . ds R" '' |
|---|
| 41 | 'br\} |
|---|
| 42 | .\" |
|---|
| 43 | .\" Escape single quotes in literal strings from groff's Unicode transform. |
|---|
| 44 | .ie \n(.g .ds Aq \(aq |
|---|
| 45 | .el .ds Aq ' |
|---|
| 46 | .\" |
|---|
| 47 | .\" If the F register is turned on, we'll generate index entries on stderr for |
|---|
| 48 | .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
|---|
| 49 | .\" entries marked with X<> in POD. Of course, you'll have to process the |
|---|
| 50 | .\" output yourself in some meaningful fashion. |
|---|
| 51 | .ie \nF \{\ |
|---|
| 52 | . de IX |
|---|
| 53 | . tm Index:\\$1\t\\n%\t"\\$2" |
|---|
| 54 | .. |
|---|
| 55 | . nr % 0 |
|---|
| 56 | . rr F |
|---|
| 57 | .\} |
|---|
| 58 | .el \{\ |
|---|
| 59 | . de IX |
|---|
| 60 | .. |
|---|
| 61 | .\} |
|---|
| 62 | .\" |
|---|
| 63 | .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). |
|---|
| 64 | .\" Fear. Run. Save yourself. No user-serviceable parts. |
|---|
| 65 | . \" fudge factors for nroff and troff |
|---|
| 66 | .if n \{\ |
|---|
| 67 | . ds #H 0 |
|---|
| 68 | . ds #V .8m |
|---|
| 69 | . ds #F .3m |
|---|
| 70 | . ds #[ \f1 |
|---|
| 71 | . ds #] \fP |
|---|
| 72 | .\} |
|---|
| 73 | .if t \{\ |
|---|
| 74 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) |
|---|
| 75 | . ds #V .6m |
|---|
| 76 | . ds #F 0 |
|---|
| 77 | . ds #[ \& |
|---|
| 78 | . ds #] \& |
|---|
| 79 | .\} |
|---|
| 80 | . \" simple accents for nroff and troff |
|---|
| 81 | .if n \{\ |
|---|
| 82 | . ds ' \& |
|---|
| 83 | . ds ` \& |
|---|
| 84 | . ds ^ \& |
|---|
| 85 | . ds , \& |
|---|
| 86 | . ds ~ ~ |
|---|
| 87 | . ds / |
|---|
| 88 | .\} |
|---|
| 89 | .if t \{\ |
|---|
| 90 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" |
|---|
| 91 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' |
|---|
| 92 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' |
|---|
| 93 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' |
|---|
| 94 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' |
|---|
| 95 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' |
|---|
| 96 | .\} |
|---|
| 97 | . \" troff and (daisy-wheel) nroff accents |
|---|
| 98 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' |
|---|
| 99 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' |
|---|
| 100 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] |
|---|
| 101 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' |
|---|
| 102 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' |
|---|
| 103 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] |
|---|
| 104 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] |
|---|
| 105 | .ds ae a\h'-(\w'a'u*4/10)'e |
|---|
| 106 | .ds Ae A\h'-(\w'A'u*4/10)'E |
|---|
| 107 | . \" corrections for vroff |
|---|
| 108 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' |
|---|
| 109 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' |
|---|
| 110 | . \" for low resolution devices (crt and lpr) |
|---|
| 111 | .if \n(.H>23 .if \n(.V>19 \ |
|---|
| 112 | \{\ |
|---|
| 113 | . ds : e |
|---|
| 114 | . ds 8 ss |
|---|
| 115 | . ds o a |
|---|
| 116 | . ds d- d\h'-1'\(ga |
|---|
| 117 | . ds D- D\h'-1'\(hy |
|---|
| 118 | . ds th \o'bp' |
|---|
| 119 | . ds Th \o'LP' |
|---|
| 120 | . ds ae ae |
|---|
| 121 | . ds Ae AE |
|---|
| 122 | .\} |
|---|
| 123 | .rm #[ #] #H #V #F C |
|---|
| 124 | .\" ======================================================================== |
|---|
| 125 | .\" |
|---|
| 126 | .IX Title "REMCTLD 8" |
|---|
| 127 | .TH REMCTLD 8 "2009-05-22" "2.14" "remctl" |
|---|
| 128 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes |
|---|
| 129 | .\" way too many mistakes in technical documents. |
|---|
| 130 | .if n .ad l |
|---|
| 131 | .nh |
|---|
| 132 | .SH "NAME" |
|---|
| 133 | remctld \- Server for remctl, a remote command execution utility |
|---|
| 134 | .SH "SYNOPSIS" |
|---|
| 135 | .IX Header "SYNOPSIS" |
|---|
| 136 | remctld [\fB\-dFhmSv\fR] [\fB\-f\fR \fIconfig\fR] [\fB\-k\fR \fIkeytab\fR] [\fB\-P\fR \fIfile\fR] |
|---|
| 137 | [\fB\-p\fR \fIport\fR] [\fB\-s\fR \fIservice\fR] |
|---|
| 138 | .SH "DESCRIPTION" |
|---|
| 139 | .IX Header "DESCRIPTION" |
|---|
| 140 | \&\fBremctld\fR is the server for remctl. It accepts a connection from remctl, |
|---|
| 141 | receives the command to execute and the arguments, verifies authorization |
|---|
| 142 | of the user and executes the command, returning the result back to the |
|---|
| 143 | client. All connections are authenticated using GSS-API Kerberos v5, and |
|---|
| 144 | all transmissions are also encrypted using the GSS-API privacy layer. |
|---|
| 145 | .PP |
|---|
| 146 | \&\fBremctld\fR is normally started using \fBtcpserver\fR or from \fBinetd\fR, but it |
|---|
| 147 | may be run in stand-alone mode as a daemon using \fB\-m\fR. Either \fB\-s\fR must |
|---|
| 148 | be given to use an alternate identity (which will require the same flag be |
|---|
| 149 | used for \fBremctl\fR client invocations), or it must be run as root to read |
|---|
| 150 | the host keytab file. \fBremctld\fR logs its activity using syslog (the |
|---|
| 151 | daemon facility). |
|---|
| 152 | .PP |
|---|
| 153 | The location of the configuration file may be specified with the \fB\-f\fR |
|---|
| 154 | option. The default location is \fI\f(CI@sysconfdir\fI@/remctl.conf\fR. For |
|---|
| 155 | information on the format of the configuration file, see \*(L"\s-1CONFIGURATION\s0 |
|---|
| 156 | \&\s-1FILE\s0\*(R" below. |
|---|
| 157 | .PP |
|---|
| 158 | When the command is run, several environment variables will be set |
|---|
| 159 | providing information about the remote connection. See \s-1ENVIRONMENT\s0 |
|---|
| 160 | below for more information. |
|---|
| 161 | .SH "OPTIONS" |
|---|
| 162 | .IX Header "OPTIONS" |
|---|
| 163 | .IP "\fB\-d\fR" 4 |
|---|
| 164 | .IX Item "-d" |
|---|
| 165 | Enable verbose debug logging to syslog (or to standard output if \fB\-S\fR is |
|---|
| 166 | also given). |
|---|
| 167 | .IP "\fB\-F\fR" 4 |
|---|
| 168 | .IX Item "-F" |
|---|
| 169 | Normally when running in stand-alone mode (\fB\-m\fR), \fBremctld\fR backgrounds |
|---|
| 170 | itself to run as a daemon, changes directory to \fI/\fR, and drops any |
|---|
| 171 | controlling terminal. This flag suppresses this behavior, usually for |
|---|
| 172 | debugging or so that \fBremctld\fR can be monitored by other processes. |
|---|
| 173 | .IP "\fB\-f\fR \fIconfig\fR" 4 |
|---|
| 174 | .IX Item "-f config" |
|---|
| 175 | The configuration file for \fBremctld\fR, overriding the default path. |
|---|
| 176 | .IP "\fB\-h\fR" 4 |
|---|
| 177 | .IX Item "-h" |
|---|
| 178 | Show a brief usage message and then exit. |
|---|
| 179 | .IP "\fB\-k\fR \fIkeytab\fR" 4 |
|---|
| 180 | .IX Item "-k keytab" |
|---|
| 181 | Use \fIkeytab\fR as the keytab for server credentials rather than the system |
|---|
| 182 | default or the value of the \s-1KRB5_KTNAME\s0 environment variable. Using \fB\-k\fR |
|---|
| 183 | just sets the \s-1KRB5_KTNAME\s0 environment variable internally in the process. |
|---|
| 184 | .IP "\fB\-m\fR" 4 |
|---|
| 185 | .IX Item "-m" |
|---|
| 186 | Enable stand-alone mode. \fBremctld\fR will listen to its configured port |
|---|
| 187 | and fork a new child for each incoming connection. By default, when this |
|---|
| 188 | option is used, \fBremctld\fR also changes directory to \fI/\fR, backgrounds |
|---|
| 189 | itself, and closes standard input, output, and error. To not background, |
|---|
| 190 | pass \fB\-F\fR as well. To not close standard output and error and continue |
|---|
| 191 | using them for logging, pass \fB\-S\fR as well. |
|---|
| 192 | .Sp |
|---|
| 193 | To determine the port, \fBremctld\fR attempts to look up the \f(CW\*(C`remctl\*(C'\fR |
|---|
| 194 | service in the local \fI/etc/services\fR file and uses the port defined |
|---|
| 195 | there. If the \f(CW\*(C`remctl\*(C'\fR service could not be found, it uses 4373, the |
|---|
| 196 | registered remctl port. |
|---|
| 197 | .IP "\fB\-P\fR \fIfile\fR" 4 |
|---|
| 198 | .IX Item "-P file" |
|---|
| 199 | When running in stand-alone mode (\fB\-m\fR), write the \s-1PID\s0 of \fBremctld\fR to |
|---|
| 200 | \&\fIfile\fR. This option is ignored unless \fB\-m\fR is also given. |
|---|
| 201 | .IP "\fB\-p\fR \fIport\fR" 4 |
|---|
| 202 | .IX Item "-p port" |
|---|
| 203 | When running in stand-alone mode, Listen on port \fIport\fR rather than the |
|---|
| 204 | default. This option does nothing unless used with \fB\-m\fR. |
|---|
| 205 | .IP "\fB\-S\fR" 4 |
|---|
| 206 | .IX Item "-S" |
|---|
| 207 | Rather than logging to syslog, log debug and routine connection messages |
|---|
| 208 | to standard output and error messages to standard error. This option is |
|---|
| 209 | mostly useful for testing and debugging. |
|---|
| 210 | .IP "\fB\-s\fR \fIservice\fR" 4 |
|---|
| 211 | .IX Item "-s service" |
|---|
| 212 | Specifies which principal is used as the server identity for client |
|---|
| 213 | authentication. The client must also use the same identity as the server |
|---|
| 214 | identity for authentication to succeed. By default, \fBremctld\fR accepts |
|---|
| 215 | any principal with a key in the default keytab file (which can be changed |
|---|
| 216 | with the \fB\-k\fR option). This is normally the most desirable behavior. |
|---|
| 217 | .IP "\fB\-v\fR" 4 |
|---|
| 218 | .IX Item "-v" |
|---|
| 219 | Print the version of \fBremctld\fR and exit. |
|---|
| 220 | .SH "CONFIGURATION FILE" |
|---|
| 221 | .IX Header "CONFIGURATION FILE" |
|---|
| 222 | The configuration file defines the allowed commands and specifies access |
|---|
| 223 | control information. The configuration file format is lines of space\- or |
|---|
| 224 | tab-separated strings, where each line is: |
|---|
| 225 | .PP |
|---|
| 226 | .Vb 1 |
|---|
| 227 | \& command subcommand executable [option=value ...] acl [acl ...] |
|---|
| 228 | .Ve |
|---|
| 229 | .PP |
|---|
| 230 | Each command consists of a command, a subcommand, and zero or more |
|---|
| 231 | arguments. Each configuration line defines an acceptable command and |
|---|
| 232 | subcommand (or, if \f(CW\*(C`ALL\*(C'\fR is used as mentioned below under \fIservice\fR, a |
|---|
| 233 | set of commands). The first configuration line matching the received |
|---|
| 234 | command is used, so list more specific entries before more general |
|---|
| 235 | entries. |
|---|
| 236 | .PP |
|---|
| 237 | Blank lines and lines beginning with \f(CW\*(C`#\*(C'\fR are ignored. Lines can be |
|---|
| 238 | continued on the next line by ending them with a backslash (\f(CW\*(C`\e\*(C'\fR). Be |
|---|
| 239 | aware that comments can be continued with a backslash as well. |
|---|
| 240 | .PP |
|---|
| 241 | As a special case, a line like: |
|---|
| 242 | .PP |
|---|
| 243 | .Vb 1 |
|---|
| 244 | \& include file |
|---|
| 245 | .Ve |
|---|
| 246 | .PP |
|---|
| 247 | will include \fIfile\fR as if its contents were pasted verbatim into the |
|---|
| 248 | configuration file at that point. \fIfile\fR may be a directory, in which |
|---|
| 249 | case all files whose names do not contain a period found in that directory |
|---|
| 250 | will be included (in no particular order). \fIfile\fR should be a fully |
|---|
| 251 | qualified path. |
|---|
| 252 | .PP |
|---|
| 253 | The meaning of these fields is: |
|---|
| 254 | .IP "\fIcommand\fR" 4 |
|---|
| 255 | .IX Item "command" |
|---|
| 256 | The command being issued. Normally, related commands (such as all |
|---|
| 257 | commands for managing a particular service) are grouped together as |
|---|
| 258 | subcommands under one command. |
|---|
| 259 | .IP "\fIsubcommand\fR" 4 |
|---|
| 260 | .IX Item "subcommand" |
|---|
| 261 | The subcommand within the command being requested, such as \f(CW\*(C`release\*(C'\fR for |
|---|
| 262 | the release function of the \s-1AFS\s0 volume backend. If the keyword \f(CW\*(C`ALL\*(C'\fR is |
|---|
| 263 | used instead of a specific subcommand, this line matches all subcommands |
|---|
| 264 | with the given command and can be used to dispatch all subcommands under |
|---|
| 265 | that command to the same executable with the same ACLs. Since the first |
|---|
| 266 | matching entry is used, list entries for specific services first (if any) |
|---|
| 267 | and then the \f(CW\*(C`ALL\*(C'\fR catch-all. |
|---|
| 268 | .Sp |
|---|
| 269 | \&\fBremctld\fR accepts commands with no subcommand argument. Such commands |
|---|
| 270 | will only match lines in the configuration file with \f(CW\*(C`ALL\*(C'\fR for the |
|---|
| 271 | service. (The \fBremctl\fR client will not send such commands, but they can |
|---|
| 272 | be sent using the client library or via another implementation.) |
|---|
| 273 | .Sp |
|---|
| 274 | The subcommand is always passed as the first argument to the executable |
|---|
| 275 | program that is listed for that service unless no subcommand was given. |
|---|
| 276 | .IP "\fIexecutable\fR" 4 |
|---|
| 277 | .IX Item "executable" |
|---|
| 278 | The full path to the command executable to run for this command and |
|---|
| 279 | subcommand combination. (See examples below.) |
|---|
| 280 | .IP "\fIoption\fR=\fIvalue\fR" 4 |
|---|
| 281 | .IX Item "option=value" |
|---|
| 282 | An option setting that applies to this command. Supported option settings |
|---|
| 283 | are: |
|---|
| 284 | .RS 4 |
|---|
| 285 | .IP "\fIlogmask\fR=\fIn\fR[,...]" 4 |
|---|
| 286 | .IX Item "logmask=n[,...]" |
|---|
| 287 | Limit logging of command arguments. Any argument listed in the logmask |
|---|
| 288 | list will have its value logged as \*(L"**MASKED**\*(R". This is to avoid logging |
|---|
| 289 | the arguments of commands that take private information such as passwords. |
|---|
| 290 | The logmask list should contain argument numbers separated by commas, with |
|---|
| 291 | the \fIsubcommand\fR considered argument 1. The \fIcommand\fR argument cannot |
|---|
| 292 | be masked. |
|---|
| 293 | .Sp |
|---|
| 294 | For example, if the command is \f(CW\*(C`admin passwd \f(CIusername\f(CW \f(CIpassword\f(CW\*(C'\fR, |
|---|
| 295 | then you'd want to set logmask to \f(CW3\fR, so the password argument gets |
|---|
| 296 | logged as \f(CW\*(C`**MASKED**\*(C'\fR. If the command is \f(CW\*(C`user passwd \f(CIusername\f(CW |
|---|
| 297 | \&\f(CIold\-password\f(CW \f(CInew\-password\f(CW\*(C'\fR, you'd want to set logmask to \f(CW\*(C`3,4\*(C'\fR. |
|---|
| 298 | .ie n .IP "\fIstdin\fR=(\fIn\fR | ""last"")" 4 |
|---|
| 299 | .el .IP "\fIstdin\fR=(\fIn\fR | \f(CWlast\fR)" 4 |
|---|
| 300 | .IX Item "stdin=(n | last)" |
|---|
| 301 | Specifies that the \fIn\fRth or last argument to the command be passed on |
|---|
| 302 | standard input instead of on the command line. The value of this option |
|---|
| 303 | must either be the number of argument to pass on standard input (with the |
|---|
| 304 | \&\fIsubcommand\fR considered argument 1) or the special value \f(CW\*(C`last\*(C'\fR, which |
|---|
| 305 | indicates that the final argument (no matter how many there are) be passed |
|---|
| 306 | on standard input. |
|---|
| 307 | .Sp |
|---|
| 308 | The \fIsubcommand\fR cannot be passed on standard input, so \fIn\fR must be at |
|---|
| 309 | least \f(CW2\fR. If this option is set to \f(CW\*(C`last\*(C'\fR and no arguments are given |
|---|
| 310 | except the \fIcommand\fR and possibly the \fIsubcommand\fR, nothing will be |
|---|
| 311 | passed on standard input. |
|---|
| 312 | .Sp |
|---|
| 313 | This option is used primarily for passing large amounts of data that may |
|---|
| 314 | not fit on the command line or data that contains \s-1NUL\s0 characters. It can |
|---|
| 315 | also be used for arguments like passwords that shouldn't be exposed on the |
|---|
| 316 | command line. Only at most one argument may be passed on standard input |
|---|
| 317 | to the command. |
|---|
| 318 | .RE |
|---|
| 319 | .RS 4 |
|---|
| 320 | .RE |
|---|
| 321 | .IP "\fIacl\fR" 4 |
|---|
| 322 | .IX Item "acl" |
|---|
| 323 | One or more entries of the form [\fImethod\fR:]\fIdata\fR, where \fImethod\fR |
|---|
| 324 | specifies an access control method to be used, and \fIdata\fR contains |
|---|
| 325 | parameters whose meaning depends on the method. If the method is omitted, |
|---|
| 326 | the data is processed as described for the \f(CW\*(C`file\*(C'\fR method. |
|---|
| 327 | .Sp |
|---|
| 328 | If \fImethod\fR is omitted, \fIacl\fR must either begin with \f(CW\*(C`/\*(C'\fR or must not |
|---|
| 329 | contain \f(CW\*(C`=\*(C'\fR. Otherwise, it will be parsed as an option instead. If |
|---|
| 330 | there is any ambiguity, prepend the \fImethod\fR. |
|---|
| 331 | .Sp |
|---|
| 332 | Each entry is checked in order, and access is granted as soon as an |
|---|
| 333 | entry matches. If no entry matches, access is denied. The following |
|---|
| 334 | methods are supported: |
|---|
| 335 | .RS 4 |
|---|
| 336 | .IP "file" 4 |
|---|
| 337 | .IX Item "file" |
|---|
| 338 | The data is the full path of an \s-1ACL\s0 file or to a directory containing \s-1ACL\s0 |
|---|
| 339 | files. Directories are handled as described for the include directive in |
|---|
| 340 | configuration files. An \s-1ACL\s0 file contains one entry per line, in the |
|---|
| 341 | [\fImethod\fR:]\fIdata\fR form described above. Entries are handled exactly as |
|---|
| 342 | if they had appeared in the configuration file except that the default |
|---|
| 343 | method is \f(CW\*(C`princ\*(C'\fR instead of \f(CW\*(C`file\*(C'\fR. Blank lines and lines beginning |
|---|
| 344 | with \f(CW\*(C`#\*(C'\fR are ignored in the \s-1ACL\s0 files. |
|---|
| 345 | .Sp |
|---|
| 346 | For backward compatibility, a line like: |
|---|
| 347 | .Sp |
|---|
| 348 | .Vb 1 |
|---|
| 349 | \& include [<method>:]<data> |
|---|
| 350 | .Ve |
|---|
| 351 | .Sp |
|---|
| 352 | in an \s-1ACL\s0 file behaves exactly as if the \f(CW\*(C`include\*(C'\fR directive had been |
|---|
| 353 | omitted, except that the default method is \f(CW\*(C`file\*(C'\fR. Thus, writing: |
|---|
| 354 | .Sp |
|---|
| 355 | .Vb 1 |
|---|
| 356 | \& include <path> |
|---|
| 357 | .Ve |
|---|
| 358 | .Sp |
|---|
| 359 | in an \s-1ACL\s0 file is the same as writing: |
|---|
| 360 | .Sp |
|---|
| 361 | .Vb 1 |
|---|
| 362 | \& file:<path> |
|---|
| 363 | .Ve |
|---|
| 364 | .Sp |
|---|
| 365 | and is handled identically to the include directive in configuration |
|---|
| 366 | files. |
|---|
| 367 | .IP "princ" 4 |
|---|
| 368 | .IX Item "princ" |
|---|
| 369 | The data is the name of a Kerberos v5 principal which is to be granted |
|---|
| 370 | access, such as \f(CW\*(C`username@EXAMPLE.ORG\*(C'\fR. |
|---|
| 371 | .IP "deny" 4 |
|---|
| 372 | .IX Item "deny" |
|---|
| 373 | This method is used to selectively deny access. The data is parsed as a |
|---|
| 374 | [\fImethod\fR:]\fIdata\fR and evaluated as described above, with the default |
|---|
| 375 | scheme being \f(CW\*(C`princ\*(C'\fR. If it matches, access is denied immediately |
|---|
| 376 | without examining any further entries. Otherwise, processing continues. |
|---|
| 377 | .Sp |
|---|
| 378 | Remember that access is granted as soon as an entry matches. For \f(CW\*(C`deny\*(C'\fR |
|---|
| 379 | rules to be effective, they therefore must come before any ACLs they are |
|---|
| 380 | intended to override. Be careful when using \f(CW\*(C`deny\*(C'\fR when including a |
|---|
| 381 | directory of \s-1ACL\s0 files, since the files in that directory are read in an |
|---|
| 382 | undefined order (not in alphabetical order by filename). It's best to |
|---|
| 383 | explicitly include the file containing \f(CW\*(C`deny\*(C'\fR \s-1ACL\s0 rules first. |
|---|
| 384 | .Sp |
|---|
| 385 | Note that \f(CW\*(C`deny\*(C'\fR only denies access; it never grants it. Thus, deny |
|---|
| 386 | alone does not grant access to anyone, and using deny on itself as in |
|---|
| 387 | \&\f(CW\*(C`deny:deny:foo\*(C'\fR neither denies nor grants access to anyone. |
|---|
| 388 | .IP "gput" 4 |
|---|
| 389 | .IX Item "gput" |
|---|
| 390 | This method is used to grant access based on the \s-1CMU\s0 \s-1GPUT\s0 (Global |
|---|
| 391 | Privileged User Table \*(-- see \fIgput\fR\|(5)). The data is either a \s-1GPUT\s0 role |
|---|
| 392 | name or a string of the form \fIgroup\fR[\fIxform\fR], where \fIgroup\fR is a \s-1GPUT\s0 |
|---|
| 393 | role name and \fIxform\fR is a \s-1GPUT\s0 transform string. Access is granted if |
|---|
| 394 | the user is a member of the specified \s-1GPUT\s0 group, after applying either |
|---|
| 395 | the optional \fIxform\fR or the default transform. |
|---|
| 396 | .Sp |
|---|
| 397 | This method is supported only if \fBremctld\fR was compiled with \s-1GPUT\s0 support |
|---|
| 398 | by using the \f(CW\*(C`\-\-with\-gput\*(C'\fR configure option. |
|---|
| 399 | .RE |
|---|
| 400 | .RS 4 |
|---|
| 401 | .Sp |
|---|
| 402 | The keyword \s-1ANYUSER\s0 may be used instead of the ACLs to allow access to all |
|---|
| 403 | users. The user still needs to authenticate to \fBremctld\fR; this only |
|---|
| 404 | affects authorization. This can be used for backend programs that want to |
|---|
| 405 | check ACLs themselves and will retrieve the authenticated principal from |
|---|
| 406 | the \s-1REMOTE_USER\s0 environment variable. Note that \s-1ANYUSER\s0 accepts \fBany\fR |
|---|
| 407 | authenticated user, including cross-realm users from foreign Kerberos |
|---|
| 408 | realms. |
|---|
| 409 | .Sp |
|---|
| 410 | Support for \s-1ACL\s0 schemes is new in remctl 2.13. Prior versions of |
|---|
| 411 | \&\fBremctld\fR expected only files in the main \fBremctld\fR configuration file, |
|---|
| 412 | and only principals or lines starting with \f(CW\*(C`include\*(C'\fR in those files, |
|---|
| 413 | without any \fImethod\fR: prefixes. |
|---|
| 414 | .RE |
|---|
| 415 | .SH "ENVIRONMENT" |
|---|
| 416 | .IX Header "ENVIRONMENT" |
|---|
| 417 | The following environment variables will be set for any commands run via |
|---|
| 418 | \&\fBremctld\fR: |
|---|
| 419 | .IP "\s-1REMOTE_USER\s0" 4 |
|---|
| 420 | .IX Item "REMOTE_USER" |
|---|
| 421 | .PD 0 |
|---|
| 422 | .IP "\s-1REMUSER\s0" 4 |
|---|
| 423 | .IX Item "REMUSER" |
|---|
| 424 | .PD |
|---|
| 425 | Set to the Kerberos principal of the authenticated client. \s-1REMUSER\s0 has |
|---|
| 426 | always been set by \fBremctld\fR; \s-1REMOTE_USER\s0 is also set (to the same value) |
|---|
| 427 | starting with remctl 2.1. |
|---|
| 428 | .IP "\s-1REMOTE_ADDR\s0" 4 |
|---|
| 429 | .IX Item "REMOTE_ADDR" |
|---|
| 430 | The \s-1IP\s0 address of the remote host. Currently, this is always an IPv4 |
|---|
| 431 | address, but in the future it may be set to an IPv6 address. This |
|---|
| 432 | environment variable was added in remctl 2.1. |
|---|
| 433 | .IP "\s-1REMOTE_HOST\s0" 4 |
|---|
| 434 | .IX Item "REMOTE_HOST" |
|---|
| 435 | The hostname of the remote host, if it was available. If reverse name |
|---|
| 436 | resolution failed, this environment variable will not be set. This |
|---|
| 437 | variable was added in remctl 2.1. |
|---|
| 438 | .PP |
|---|
| 439 | \&\fBremctld\fR also used to set \s-1SCPRINCIPAL\s0 for (partial) backward |
|---|
| 440 | compatibility with \fBsysctld\fR, but stopped doing so as of remctl 2.1. |
|---|
| 441 | .PP |
|---|
| 442 | If the \fB\-k\fR flag is used, \fBremctld\fR will also set \s-1KRB5_KTNAME\s0 to the |
|---|
| 443 | provided keytab path. This is primarily for communication with the |
|---|
| 444 | GSS-API library, but this setting will also be inherited by any commands |
|---|
| 445 | run by \fBremctld\fR. |
|---|
| 446 | .SH "EXAMPLES" |
|---|
| 447 | .IX Header "EXAMPLES" |
|---|
| 448 | Typically \fBremctld\fR is to be started as follows, where \*(L"hostname\*(R" is the |
|---|
| 449 | machine where remctld will run, and 4373 is the port: |
|---|
| 450 | .PP |
|---|
| 451 | .Vb 1 |
|---|
| 452 | \& tcpserver hostname 4373 remctld |
|---|
| 453 | .Ve |
|---|
| 454 | .PP |
|---|
| 455 | The equivalent line for \fI/etc/inetd.conf\fR is: |
|---|
| 456 | .PP |
|---|
| 457 | .Vb 1 |
|---|
| 458 | \& 4373 stream tcp nowait root /usr/sbin/tcpd /usr/sbin/remctld |
|---|
| 459 | .Ve |
|---|
| 460 | .PP |
|---|
| 461 | or: |
|---|
| 462 | .PP |
|---|
| 463 | .Vb 1 |
|---|
| 464 | \& remctl stream tcp nowait root /usr/sbin/tcpd /usr/sbin/remctld |
|---|
| 465 | .Ve |
|---|
| 466 | .PP |
|---|
| 467 | if the \f(CW\*(C`remctl\*(C'\fR service is listed in your \fI/etc/services\fR file. |
|---|
| 468 | .PP |
|---|
| 469 | To start \fBremctld\fR in stand-alone mode instead, run: |
|---|
| 470 | .PP |
|---|
| 471 | .Vb 1 |
|---|
| 472 | \& remctld \-m |
|---|
| 473 | .Ve |
|---|
| 474 | .PP |
|---|
| 475 | Example configuration file: |
|---|
| 476 | .PP |
|---|
| 477 | .Vb 7 |
|---|
| 478 | \& # Comments can be used like this. |
|---|
| 479 | \& accounts create /usr/local/bin/doaccount /etc/acl/group1 \e |
|---|
| 480 | \& /etc/acl/group2 |
|---|
| 481 | \& accounts delete /usr/local/bin/doaccount /etc/acl/group3 |
|---|
| 482 | \& accounts view /usr/local/bin/doaccount ANYUSER |
|---|
| 483 | \& accounts passwd /usr/local/bin/dopasswd logmask=3 /etc/acl/group1 |
|---|
| 484 | \& printing ALL /usr/local/bin/printthing /etc/acl/group2 |
|---|
| 485 | .Ve |
|---|
| 486 | .PP |
|---|
| 487 | The commands \f(CW\*(C`accounts create\*(C'\fR, \f(CW\*(C`accounts delete\*(C'\fR, and so forth will all |
|---|
| 488 | be passed to /usr/local/bin/doaccount with the first argument being the |
|---|
| 489 | specific subcommand, with the exception of \f(CW\*(C`accounts passwd\*(C'\fR. That |
|---|
| 490 | command will be passed to /usr/local/bin/dopasswd instead, but it will |
|---|
| 491 | still get \f(CW\*(C`passwd\*(C'\fR as its first argument. The third argument to |
|---|
| 492 | \&\f(CW\*(C`accounts passwd\*(C'\fR (presumably the password) will not be logged to syslog. |
|---|
| 493 | All commands starting with \f(CW\*(C`printing\*(C'\fR will be passed to |
|---|
| 494 | /usr/local/bin/printthing. |
|---|
| 495 | .PP |
|---|
| 496 | Example \s-1ACL\s0 file using the scheme support new in remctl 2.13: |
|---|
| 497 | .PP |
|---|
| 498 | .Vb 5 |
|---|
| 499 | \& # This is a comment. |
|---|
| 500 | \& deny:baduser@EXAMPLE.ORG |
|---|
| 501 | \& file:/etc/remctl/acl/admins |
|---|
| 502 | \& principal:service/admin@EXAMPLE.ORG |
|---|
| 503 | \& service/other@EXAMPLE.ORG |
|---|
| 504 | .Ve |
|---|
| 505 | .PP |
|---|
| 506 | This \s-1ACL\s0 file will reject \f(CW\*(C`baduser@EXAMPLE.ORG\*(C'\fR even if that user would |
|---|
| 507 | have been allowed by one of the other \s-1ACL\s0 rules. It will then grant |
|---|
| 508 | access according to the \s-1ACL\s0 entries in \fI/etc/remctl/acl/admins\fR and the |
|---|
| 509 | specific principals \f(CW\*(C`service/admin@EXAMPLE.ORG\*(C'\fR and |
|---|
| 510 | \&\f(CW\*(C`service/other@EXAMPLE.ORG\*(C'\fR. The last line takes advantage of the |
|---|
| 511 | default \s-1ACL\s0 method of \f(CW\*(C`principal\*(C'\fR when processing an \s-1ACL\s0 file. |
|---|
| 512 | .SH "CAVEATS" |
|---|
| 513 | .IX Header "CAVEATS" |
|---|
| 514 | When using Heimdal with triple-DES keys and talking to old clients that |
|---|
| 515 | only speak version one of the remctl protocol, \fBremctld\fR may have |
|---|
| 516 | problems with \s-1MIC\s0 verification. This doesn't affect new clients and |
|---|
| 517 | servers since the version two protocol doesn't use MICs. If you are using |
|---|
| 518 | Heimdal and run into \s-1MIC\s0 verification problems, see the \s-1COMPATIBILITY\s0 |
|---|
| 519 | section of \fIgssapi\fR\|(3). |
|---|
| 520 | .PP |
|---|
| 521 | \&\fBremctld\fR does not itself impose any limits on the number of child |
|---|
| 522 | processes or other system resources. You may want to set resource limits |
|---|
| 523 | in your inetd server or with \fBulimit\fR when running it as a standalone |
|---|
| 524 | daemon or under \fBtcpserver\fR. |
|---|
| 525 | .PP |
|---|
| 526 | Command arguments may not contain \s-1NUL\s0 characters and must be shorter than |
|---|
| 527 | the operating system limit on the length of a command line since they're |
|---|
| 528 | passed to the command as command-line arguments. The exception is an |
|---|
| 529 | argument passed via standard input using the \f(CW\*(C`stdin=\*(C'\fR option in the |
|---|
| 530 | configuration file. At most one argument may be passed that way. |
|---|
| 531 | .SH "NOTES" |
|---|
| 532 | .IX Header "NOTES" |
|---|
| 533 | The remctl port number, 4373, was derived by tracing the diagonals of a |
|---|
| 534 | \&\s-1QWERTY\s0 keyboard up from the letters \f(CW\*(C`remc\*(C'\fR to the number row. |
|---|
| 535 | .SH "SEE ALSO" |
|---|
| 536 | .IX Header "SEE ALSO" |
|---|
| 537 | \&\fIremctl\fR\|(1), \fIsyslog\fR\|(3), \fItcpserver\fR\|(1) |
|---|
| 538 | .PP |
|---|
| 539 | The current version of this program is available from its web page at |
|---|
| 540 | <http://www.eyrie.org/~eagle/software/remctl/>. |
|---|
| 541 | .SH "AUTHOR" |
|---|
| 542 | .IX Header "AUTHOR" |
|---|
| 543 | Anton Ushakov <antonu@stanford.edu> is the original author. Updates and |
|---|
| 544 | current maintenance are done by Russ Allbery <rra@stanford.edu>. |
|---|
| 545 | .SH "COPYRIGHT AND LICENSE" |
|---|
| 546 | .IX Header "COPYRIGHT AND LICENSE" |
|---|
| 547 | Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Board of |
|---|
| 548 | Trustees, Leland Stanford Jr. University. All rights reserved. |
|---|
| 549 | .PP |
|---|
| 550 | Permission to use, copy, modify, and distribute this software and its |
|---|
| 551 | documentation for any purpose and without fee is hereby granted, provided |
|---|
| 552 | that the above copyright notice appear in all copies and that both that |
|---|
| 553 | copyright notice and this permission notice appear in supporting |
|---|
| 554 | documentation, and that the name of Stanford University not be used in |
|---|
| 555 | advertising or publicity pertaining to distribution of the software |
|---|
| 556 | without specific, written prior permission. Stanford University makes no |
|---|
| 557 | representations about the suitability of this software for any purpose. |
|---|
| 558 | It is provided \*(L"as is\*(R" without express or implied warranty. |
|---|
| 559 | .PP |
|---|
| 560 | \&\s-1THIS\s0 \s-1SOFTWARE\s0 \s-1IS\s0 \s-1PROVIDED\s0 \*(L"\s-1AS\s0 \s-1IS\s0\*(R" \s-1AND\s0 \s-1WITHOUT\s0 \s-1ANY\s0 \s-1EXPRESS\s0 \s-1OR\s0 \s-1IMPLIED\s0 |
|---|
| 561 | \&\s-1WARRANTIES\s0, \s-1INCLUDING\s0, \s-1WITHOUT\s0 \s-1LIMITATION\s0, \s-1THE\s0 \s-1IMPLIED\s0 \s-1WARRANTIES\s0 \s-1OF\s0 |
|---|
| 562 | \&\s-1MERCHANTABILITY\s0 \s-1AND\s0 \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. |
|---|