YPBIND(8)

๐Ÿ“ฆ
version 2.7.2 ยท 5 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’– YPBIND โ€” the NIS binding process, bestie edition ๐Ÿ’–

okay so this is ypbind from the ypbind-mt family, and she is literally the matchmaker between your machine and your NIS servers. let's get into it ๐Ÿซถ


โœจ NAME โœจ

ypbind โ€” the NIS binding process. that's her. that's the whole job title. ๐Ÿ‘‘


๐ŸŒธ SYNOPSIS ๐ŸŒธ

ypbind [-c] [-d | -debug] [-verbose] [-n | -forground] [-broadcast]
       [-broken-server] [-ypset] [-ypsetme] [-no-ping] [-f configfile]
       [-local-only] [-ping-interval ping-interval] [-p port]

ypbind --version

(yes bestie, -forground is spelled like that in the synopsis. we do not touch it. we do not fix it. we respect her. ๐Ÿ’…)


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So ypbind goes out there and finds the server for NIS domains, and then it maintains the NIS binding information. it's giving devoted partner energy fr fr.

The client โ€” which is normally the NIS routines in the standard C library โ€” can get that info over RPC from ypbind, or it can just read the binding files itself. and where do those binding files live? in the directory /var/yp/binding, and they're conventionally named [domainname].[version]. the versions that are supported are 1, 2 and 3. ๐ŸŒˆ

And listen, there can be several of these files, because it's totally possible for an NIS client to be bound to more than one domain. polyamory but for domains, we love to see it. ๐Ÿ’œ

Once a binding has been established, ypbind will send YPPROC_DOMAIN requests to the current NIS server at 5 minutes intervals. if it doesn't get a response, or the NIS server reports that it doesn't have this domain any longer, ypbind will go search for a new NIS server. ๐Ÿ”

Now here's the thing โ€” you could tell ypbind to use network broadcasts to find a new server, which is insecure, or you could just give it a list of known secure servers. if you do that second one, ypbind will send a ping to all the servers in the order in which they are listed in the config file, and use the first one that answers. first come first served, no cap. โœจ

Unless the option -debug is used, ypbind detaches itself from the controlling terminal and puts itself into the background. it uses syslog(3) for logging errors and warnings. and at startup โ€” or whenever it receives the signal SIGHUP โ€” ypbind parses the file /etc/yp.conf and tries to use the entries in there for its initial binding. ๐ŸŽ€

okay so important lore: a broadcast entry in the configuration file will overwrite a ypserver/server entry, and a ypserver/server entry will overwrite broadcast. and if all the given servers are down, ypbind will not switch to using broadcast. she said no. ๐Ÿ™…

For resolving the hostnames from /etc/yp.conf, ypbind will try /etc/hosts first and then DNS. if ypbind couldn't reconfigure the search order, it will use only DNS. and if DNS isn't available, then you could only use IP-addresses in /etc/hosts. also, ypbind could only reconfigure the search order with glibc 2.x. ๐Ÿงš

If the -broadcast option is specified, ypbind will ignore the configuration file entirely. and if the file does not exist, or if there are no valid entries, ypbind will exit. bye bestie ๐Ÿ˜ญ


๐Ÿ’… OPTIONS ๐Ÿ’…

  • -broadcast โ€” sends a broadcast to request the information needed to bind to a specific NIS server. with this option, /etc/yp.conf will be ignored. (she's going in blind, iconic but risky โœจ)
  • -ypset โ€” allows root from any remote machine to change the binding for a domain via the ypset(8) command. by default, no one can change the binding. this option is really insecure. and heads up: if you change a binding for a domain, all the current known servers for this domain will be forgotten. if the new server goes down, ypbind will use the old searchlist. ๐Ÿ’€
  • -ypsetme โ€” the same as -ypset, but only root on the local machine is allowed to change the binding. such requests are only allowed from loopback. much more chill. ๐Ÿซถ
  • -c โ€” ypbind only checks if the config file has syntax errors and exits. a vibe check, basically. ๐Ÿ‘€
  • -d, -debug โ€” starts ypbind in debug mode. ypbind will not put itself into background, and error messages and debug output are written to standard error. ๐ŸŒˆ
  • -n, -foreground โ€” ypbind will not put itself into backgroun. (that's how it's written, and we are not touching it, periodt ๐Ÿ’…)
  • -v, -verbose โ€” causes ypbind to syslog(2) any and all changes in the server it's bound to. she's keeping receipts. ๐Ÿ“
  • -broken-server โ€” lets ypbind accept answers from servers running on an illegal port number. this should usually be avoided, but it is required by some ypserv(8) versions. sometimes you gotta do what you gotta do ๐Ÿ™ˆ
  • -no-ping โ€” ypbind will not check if the binding is alive. this option is for use with dialup connections, to prevent ypbind from keeping the connection unnecessarily open or causing auto-dials. very considerate of her actually ๐ŸŽ€
  • -f configfile โ€” ypbind will use configfile and not /etc/yp.conf. pick your own adventure โœจ
  • -local-only โ€” ypbind will only bind to the loopback device and is not reachable from a remote network. introvert mode activated ๐Ÿ’œ
  • -i, -ping-interval ping-interval โ€” the default value for ypbind to check if a NIS server is still reachable is 20 seconds. with this option, another frequency in seconds can be specified. โฐ
  • -p port โ€” the privileged port number that ypbind should use to bind itself. ๐Ÿ”Œ
  • --version โ€” prints the version number. โญ

๐ŸŽ€ FILES ๐ŸŽ€

  • /etc/yp.conf โ€” configuration file.
  • /var/yp/binding/[domainname].[version] โ€” binding file containing information about each NIS domain.
  • /var/run/ypbind.pid โ€” contains the process id of the currently running ypbind master process.

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

syslog(3), domainname(1), yp.conf(5), ypdomainname(8), ypwhich(1), ypserv(8), ypset(8)


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

ypbind-mt was written by Thorsten Kukuk <kukuk@thkukuk.de>. absolute legend, we stan. ๐Ÿซถ


and that's the whole page bestie!! ๐Ÿ’– this one came from the ypbind-mt manual, version dated 01/03/2021, and it lives in section YPBIND(8). go forth and bind those domains, you've got this fr fr โœจ๐Ÿฆ‹๐ŸŒธ