USERVD(8)

πŸ’– USERVD β€” supply user services πŸ’–

okay bestie, welcome to the uservd page πŸ’… this is section 8 of the manual (system manager's manual, so you know it's giving sysadmin main character energy πŸ‘‘).


✨ NAME ✨

uservd</puruple> β€” supply user services 🫢


🌸 SYNOPSIS 🌸

userv [-daemon]

(yeah the synopsis literally says userv, not uservd. that's not me, that's the page. copy it exactly, no cap.)


πŸ¦‹ DESCRIPTION πŸ¦‹

so uservd is the daemon that userv calls up when it needs a task performed under a different userid, while keeping limited trust between the caller and the callee πŸŽ€ that's the whole vibe. it's the middlewoman. the group chat mediator. the ✨trust-but-verify✨ energy.


πŸŽ€ OPTIONS πŸŽ€

there is literally one optional argument, queen:

  • -daemon β€” asks the program to daemonise πŸ’« if you pass this flag, uservd will fork and completely detach from the controlling terminal. if you don't pass it, uservd stays in its starting process group and keeps using the supplied stderr stream for any runtime system messages β€” which is lowkey perfect if you're running uservd as a child of init 🧚 either way, errors that uservd itself detects get reported via syslog πŸ’œ

🌈 SYSLOG MESSAGES 🌈

uservd drops diagnostics of various kinds into syslog, with facility LOG_DAEMON πŸ’– the syslog levels it uses are:

  • debug β€” verbose messages about the activity of the userv daemon πŸ‘€
  • info β€” two log messages about the nature and outcome of each request πŸ“
  • notice β€” messages about the status of the daemon, including the startup message and the hourly socket check messages ⏰
  • warning β€” if uservd exits because it believes it no longer controls the rendezvous socket (ie, its socket has become orphaned 😭), this level gets messages saying why the daemon believes this, plus a notification of its shutdown πŸ’€
  • err β€” a believed-recoverable error condition was detected by the userv server in itself, the client, or the operating system (this includes resource shortages πŸ₯²). uservd will try to continue πŸ’ͺ
  • crit β€” uservd detected a non-recoverable error condition after startup and will exit πŸšͺ
  • alert β€” not used πŸ™ˆ
  • emerg β€” not used πŸ™ˆ

the service configuration language has the facility to direct error and warning messages to syslog 🎯 the default facility and level is user.err, but the author of the configuration file(s) can override this, slay ✨


⭐ EXIT STATUS ⭐

the daemon's exit code will reflect how well things went, bestie:

  • 0 β€” the daemon was asked to detach itself from the controlling terminal and this appears to have been done successfully πŸ₯³
  • 1* β€” the daemon got a SIGTERM or SIGINT and shut itself down 😴
  • 2* β€” the daemon believed that it was no longer the uservd and so exited to clean up 🧹
  • 3 β€” uservd was started with incorrect arguments 😬
  • 4 β€” a system call failure or other environmental problem occurred during startup πŸŒͺ️
  • 5* β€” there was a non-recoverable error after startup; uservd had to exit πŸ’€
  • 6 β€” the daemon was asked to detach itself, but its detaching child died for some unexpected reason 😡
  • SIGABRT/SIGIOT* β€” an unexpected internal error, usually caused by a bug in uservd πŸ› this can also occur if an attempt to block signals using sigprocmask fails 😭
outcomes marked * are not possible if the daemon is asked to detach itself β€” these exit statuses will be reaped by init instead and so will not usually be logged anywhere πŸ«₯

the daemon's per-request children will report the success or otherwise of its request in their exit status πŸ“¬ these are not usually logged unless they indicate a serious problem πŸ‘‘


πŸ’œ ENVIRONMENT πŸ’œ

all of the environment variables passed to uservd will be inherited by services as part of the default environment 🌍 (if the set-environment configuration directive is used, then other system configuration files can modify the environment. consult the specification πŸ“–).


πŸ“ SEE ALSO πŸ“

Ian Jackson, User service daemon and client specification πŸ“š


GNU userv is copyright Ian Jackson and other contributors 🫢 see README or userv --copright for full authorship information (yes, --copright, that's how it's spelled on the page, not me bestie πŸ™ˆ).

GNU userv is licensed under the terms of the GNU General Public Licence, version 3 or (at your option) any later version, and it comes with NO WARRANTY, not even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE ⚠️ see the GNU General Public License for details.

you should have received a copy of the GNU General Public License along with userv, if not, see http://www.gnu.org/licenses/ 🌐


🧚 HISTORY 🧚

uservd was initially written in 1996 by Ian Jackson ✍️ it became GNU uservd in 1999, and version 1.0 was released in 2000 πŸŽ‰


and that's the whole page, bestie!! ✨ this came from the userv manual, dated November 3, 1999 β€” vintage but iconic, fr fr πŸ’–πŸ’…

πŸ“¦ where this page comes from