REXECD(8)

πŸ“¦
version 0.17 Β· 2 versions
, in epel 10, epel 9, fedora 43, fedora 44

✨ REXECD(8) ✨ β€” the remote execution server πŸ’…

okay bestie, buckle up, this one's a classic β€” it's a page from the System Manager's Manual and it's literally called rexecd, which is short for "remote execution server" 🫢 no cap, that's the whole name.


SYNOPSIS 🌸

rexecd [ -D ]

like, that's it. one binary, one optional flag, maximum main character energy πŸ‘‘


OPTIONS ✨

bestie there is exactly one option here, we love a low-maintenance queen:

  • -D β€” turns off reverse DNS lookup, and instead the log will use the client's IP addresses. so no cute hostnames in the log, just raw numbers, but it's faster. it's giving "i don't need to know your name, i just need your digits" πŸ’€

DESCRIPTION πŸ’–

so rexecd is the server half of the rexec(3) routine. it does remote execution, and it authenticates people using user names and passwords. classic. iconic. slightly cursed but we move.

rexecd sits and listens for service requests on the port that's spelled out in the ``exec'' service specification β€” go peek at services(5) if you wanna know the deets, iykyk.

the second a service request shows up, this whole protocol kicks off, in order, no skipping steps:

  1. the server reads characters off the socket until it hits a NUL ('\0') byte. whatever string comes out gets interpreted as an ASCII number, base 10. numbers era πŸ”’
  2. if that number from step 1 is non-zero, it's read as the port number of a secondary stream, and that stream gets used for stderr. a second connection gets created to that port on the client's machine β€” but only after the user, password, and command have been received and authenticated from the client.
  3. a NUL-terminated user name gets retrieved on the initial socket. max length? 16 characters, bestie, don't push it.
  4. a NUL-terminated, unencrypted password gets retrieved on the initial socket too. also max 16 characters. yes i said unencrypted, we'll get to that in BUGS, hold on 😭
  5. a NUL-terminated command gets retrieved on the initial socket, and it's headed straight to a shell. the command's length is limited by the upper bound on the size of the system's argument list. so, y'know, don't write a novel in there.
  6. rexecd then validates the user exactly like it's done at login time, and if the auth slayed, it changes into the user's home directory and sets up the user and group protections for that user. if any of these steps fail, the connection gets aborted and a diagnostic message gets sent back. no partial credit, periodt.
  7. a NUL byte gets returned on the initial socket, and then the command line gets handed off to the user's normal login shell. that shell inherits the network connections that rexecd set up. passing the aux cord, fr fr 🎧

DIAGNOSTICS 🩺

okay so, except for the last one in this list, every diagnostic message gets returned on the initial socket, and after that all network connections get closed. an error is signaled by a leading byte with a value of 1 β€” and 0 is what gets returned in step 7 above when everything before the command execution succeeded. so 0 = good, 1 = we have a problem πŸ’€

  • username too long β€” the name is longer than 16 characters. girl, shorten it.
  • password too long β€” the password is longer than 16 characters.
  • command too long β€” the command line you passed exceeds the size of the argument list (as configured into the system).
  • Login incorrect. β€” either there was no password file entry for that user name, or the wrong password was supplied. we don't know which and it's not telling you, for security reasons ✨
  • No remote directory. β€” the chdir command to the home directory failed. the vibes were not found πŸ₯²
  • Try again. β€” a fork by the server failed. it's not you, it's the process table.
  • <shellname>: ... β€” the user's login shell could not be started. this message comes back on the connection associated with the stderr, and it is not preceded by a flag byte. special little snowflake, different rules πŸ’…

SEE ALSO πŸ‘€

  • rexec(3) β€” go read it, bestie, it's the other half of this situationship 🫢

BUGS 😭

there should be a facility that allows all data and password exchanges to be encrypted. it's not here. it should be present. it is not. we're just saying it out loud. πŸ™ˆ


HISTORY πŸ¦‹

the rexecd command first appeared in 4.2BSD. ancient. vintage. still here. she's a legend for real πŸ‘‘


and that's the whole page, bestie!! this one's from the Linux NetKit (0.17) era and it's dated March 16, 1991 β€” so yes, it's older than literally everyone you know, and it still runs. slay, queen, we stan a survivor πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from