YP_MKDB(8)
π yp_mkdb β generate the NIS databases β¨
okay so bestie, you've landed on yp_mkdb(8) from the System Manager's Manual (section 8, we love a numbered section π
). This is the little utility that builds your NIS databases, and honestly? It eats. Let's get into it. π«Ά
π SYNOPSIS π
yp_mkdb -c
yp_mkdb -u dbname
yp_mkdb [-c] [-b] [-s] [-f] [-i inputfile] [-o outputfile]
[-d domainname] [-m mastername] inputfile dbname
three whole modes, no cap. pick your fighter. β¨
π DESCRIPTION π
So. The yp_mkdb utility creates db(3) style databases for use with FreeBSD's NIS server. iconic behavior. π
It reads data from inputfile, and writes it to dbname in db(3) format (using the hash table method β hash table girlies rise πΈ). The input should be in 'key data' format, which is to say two fields of ASCII data separated by white space. The first field is assumed to be the key, and everything else is assumed to be the data. simple as that, fr fr.
These databases are typically stored in /var/yp/[domainname] where domainname is the name of the NIS domain being served. The yp_mkdb utility is usually invoked by /var/yp/Makefile. and it's not only a builder: yp_mkdb can also be used to dump an NIS database file so that its contents can be examined. inspector mode activated πβ¨
π security moment, listen up: for security reasons, all databases that yp_mkdb creates are readable and writable by owner only (and usually the owner is root). so, like, don't expect to just vibe your way in there.
The following options are available:
β¨ OPTIONS β¨
-cβ causeyp_mkdbto send aYPPROC_CLEARrequest toypserv(8)on the local host. This signal tells the server to close any open database descriptors and flush out its database cache. π«§ If used alone, this flag signals the server and does nothing else. If used as part of a database creation command,yp_mkdbwill send the signal only after the new database has been successfully created. (patience is a virtue, bestie π )-bβ causeyp_mkdbto add a special entry to the database with a key ofYP_INTERDOMAINand an empty data field. If this key is present in a map, it alters the behavior of the'match'procedure inypserv(8)slightly. If a match query fails (because the server could not find a record that matched the supplied key), and theYP_INTERDOMAINkey exists within the queried map,ypserv(8)will try to match the entry again using a DNS lookup. π¦ Note that this special behavior only applies to the hosts maps. Using the-bflag for other maps has no effect. (sorry not sorry π)-sβ this flag is used to add a special entry to the database with a key ofYP_SECUREand an empty data field. If this key is present in a map,ypserv(8)will deny access to the map to any client that is not using a reserved port for its query. πͺβ¨ This is used mainly for themaster.passwdmaps, which should be restricted to privileged access only. gatekeeping, but make it sysadmin.-fβ this flag is used to turn on filtering of lines in the source file input that start with+or-characters. These characters have special meaning for thegroup,passwdandmaster.passwdmaps and hence should not be allowed to appear in them as the first character of a key or datum. If the-fflag is used,yp_mkdbwill reject any source line that starts with a+or-character and issue a warning message displaying the line that was dropped. π rude but fair. blocked and reported.-udbname β dump (or'unwind') an NIS database. This option can be used to inspect the contents of an existing NIS database. π the way this is just a little peek behind the curtain.-iinputfile β when generating an NIS map, encode inputfile as a special entry in the database with a key ofYP_INPUT_FILE. π-ooutputfile β when generating an NIS map, encode outputfile as a special entry in the database with a key ofYP_OUTPUT_FILE. π-ddomainname β when generating an NIS map, encode domainname as a special entry in the database with a key ofYP_DOMAIN_NAME. π-mmastername β when generating an NIS map, encode mastername as a special entry in the database with a key ofYP_MASTER_NAME. This entry in the database is frequently used by various NIS utilities to determine the name of an NIS master server for a domain. By default,yp_mkdbassumes that the local host is the NIS master; the-moption is used to override this default. main character energy: the local host assumed it was the master. and honestly? valid. π
π¦ FILES π¦
/var/yp/Makefileβ the Makefile that callsyp_mkdbto build the NIS databases π
π₯ SEE ALSO π₯
go read those too, iykyk π
πΈ AUTHORS πΈ
Bill Paul <wpaul@ctr.columbia.edu> β thank you for your service, legend π«Ά
okay that's the whole page bestie, you're basically an NIS master now πβ¨ this lil Debian edition dropped on March 12, 1996 (a vintage icon, we stan a classic π), so go forth, build those databases, and remember: readable and writable by owner only. slay. π π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 1995, 1996 Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms