RPC.YPXFRD(8)
π rpc.ypxfrd(8) β NIS map transfer server π
okay bestie, sit down, we're talking about rpc.ypxfrd, straight out of section 8 of the NIS Reference Manual. she's a whole server, she moves maps, and she's lowkey the reason your NIS slave isn't sitting there buffering for six years. let's get into it π¦
β¨ SYNOPSIS β¨
/usr/sbin/rpc.ypxfrd [-d path] [-p port] [--debug]
/usr/sbin/rpc.ypxfrd --version
πΈ DESCRIPTION πΈ
so rpc.ypxfrd exists to make the transfer of very large NIS maps from a NIS master to a NIS slave server go fast. that's her whole job, that's her main character energy.
here's the situation without her: when a NIS slave server gets a message that there's a new map, it kicks off ypxfr to go get that new map. and ypxfr reads the contents of a map from the master server using the yp_all() function. one. entry. at. a. time. it's giving slow. it's giving why are we like this. π
rpc.ypxfrd swoops in and speeds up the whole transfer process by letting NIS slave servers simply copy the master server's map files instead of building their own from scratch. she does this with an RPC-based file transfer protocol. slay.
now the important caveat, and I need you to actually hear this one: if the on-disk format of the database on both machines is not the same, rpc.ypxfrd will refuse to send the data, and ypxfr will fallback to yp_all() and fetch every single entry alone. so she's not gonna hand you a file you can't read. she's dramatic but she's not messy. π
also, rpc.ypxfrd could be started by inetd. but ngl β she starts very slowly, so she should be started after ypserv from /etc/init.d/ypxfrd. periodt.
π OPTIONS π
--debugβ makes the server run in debugging mode. in debug mode, she does not background herself, and she prints extra status messages tostderrfor each request that she receives. it's her journaling era. π«Ά-dpath βrpc.ypxfrduses this directory instead of/var/yp.-pport βrpc.ypxfrdwill bind herself to this port, which makes it possible to have a router filter packets to the NIS ports. this can restrict the access to the NIS server from hosts on the Internet. gatekeeping, but make it network security. π₯--versionβ prints the version number. that's it. that's the option. π
π SECURITY π
rpc.ypxfrd uses the same functions for checking a host as ypserv. so, step by step, here's how the vibe check goes:
- first,
rpc.ypxfrdchecks a request from an address against/var/yp/securenetsor the tcp wrapper. - if the host is allowed to connect to the server,
rpc.ypxfrdthen uses the rules from/etc/ypserv.confto check the requested map. - if a mapname doesn't match a rule,
rpc.ypxfrdwill look for theYP_SECUREkey in the map. - if that key exists,
rpc.ypxfrdwill only allow requests on a reserved port.
no shortcuts, no exceptions, no "but bestie I'm literally your favorite host". π
β οΈ NOTES β οΈ
the FreeBSD ypxfrd protocol is not compatible with the one used by SunOS. not a little incompatible. not "close enough". not compatible.
it's unfortunate but it's unavoidable: SUN's protocol is not freely available. and even if it were, it would probably not be useful, since the SunOS NIS v2 implementation uses the original ndbm package for its map databases, whereas the other implementation uses GNU DBM or Berkeley DB.
and those packages use vastly different file formats. so like. yeah. π
furthermore β and this is the part that really gets me β ndbm and gdbm are byte-order and word width sensitive and not very smart about it. meaning that a gdbm or ndbm database created on a big endian or 64bit system cannot be read on a little endian or 32bit system. no cap. she just can't read it.
the good news: the FreeBSD ypxfrd protocol checks if both, master and slave, use the same database packages and, if necessary, the byte order of the system. so she knows. she's checking. π
π FILES π
/etc/ypserv.confβ configuration file for options and access rights/var/yp/securenetsβ configuration file for access rights
π SEE ALSO π
ypserv(8), makedbm(8), yppush(8), ypxfr(8)
π AUTHOR π
- ypxfrd protocol and FreeBSD Implementation: Bill Paul
<wpaul@ctr.columbia.edu> - Linux Implementation: Thorsten Kukuk
<kukuk@linux-nis.org>
and that's the whole page, bestie β straight from the NIS Reference Manual, dated 12/31/2020. go forth and copy those map files. literally. that's what she's for. πβπ
π¦ where this page comes from
- debian bookworm: ypserv 4.2-1+b2 Β· GPL-2.0-only
- debian trixie: ypserv 4.2-2+b2 Β· GPL-2.0-only
- ubuntu jammy: ypserv 4.1-2 Β· GPL-2.0-only
- ubuntu noble: ypserv 4.2-2build2 Β· GPL-2.0-only
- ubuntu questing: ypserv 4.2-2build2
- ubuntu resolute: ypserv 4.2-3 Β· GPL-2.0-only
- ubuntu stonking: ypserv 4.2-3build1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms