---
name: "yp"
section: "8"
platform: "openbsd"
package: "man"
version: "8.0-current-20261101"
release: "OpenBSD 8.0-current (2026-11-01)"
platforms: ["freebsd", "openbsd", "macos"]
url: "https://new.carta.tech/yp"
---

# yp(8)

description of the YP subsystem

## NAME

**yp** – description of the YP subsystem

## SYNOPSIS

**ypinit** **-m** \[*domainname*\]

**ypinit** **-s** *master\_server* \[*domainname*\]

**ypinit** **-u** \[*domainname*\]

**ypbind** \[**-insecure**\] \[**-ypset**\] \[**-ypsetme**\]

**ypset** \[**-d** *domain*\] \[**-h** *host*\] *server*

**yppoll** \[**-d** *domain*\] \[**-h** *host*\] *mapname*

**ypcat** \[**-kt**\] \[**-d** *domainname*\] *mapname*

**ypcat** **-x**

**ypmatch** \[**-kt**\] \[**-d** *domainname*\] *key* *...* *mapname*

**ypmatch** **-x**

**ypwhich** \[**-t**\] \[**-d** *domain*\]\[ \[**-h**\] *host*\]

**ypwhich** \[**-t**\] \[**-d** *domain*\] \[**-h** *host*\] **-m** \[*mname*\]

**ypwhich** **-x**

**ypserv** \[**-1dx**\] \[**-a** *aclfile*\]

**ypxfr** \[**-cf**\] \[**-C** *tid* *prog* *ipadd* *port*\] \[**-d** *domain*\] \[**-h** *host*\] \[**-s** *domain*\] *mapname*

**yppush** \[**-v**\] \[**-d** *domainname*\] \[**-h** *hostname*\] *mapname*

## DESCRIPTION

The **YP** subsystem allows network management of passwd, group, and hosts file entries through the functions [getpwent(3)](/getpwent/3.md), [getgrent(3)](/getgrent/3.md) and [gethostbyname(3)](/gethostbyname/3.md). A number of other databases can be network-managed as well, and have their respective functions. **YP** also provides hooks for numerous other client programs such as [amd(8)](/amd/8.md) and [rpc.bootparamd(8)](/rpc.bootparamd/8.md) to access distributed and shareable versions of their maps through **YP**. The YP subsystem requires that [portmap(8)](/portmap/8.md) be running, since the entire subsystem uses the RPC subsystem.

**ypinit** is used to initialize **YP** as a master or a slave. This creates various files in */var/yp*. After running **ypinit** **-m**, optionally edit */var/yp/DOMAINNAME/Makefile* to change settings, for example to switch from the default backwards compatible mode to secure mode. Finally, always run [make(1)](/make/1.md) in */var/yp*. See [Makefile.yp(8)](/Makefile.yp/8.md) for details.

If set up as a slave, the required databases are automatically copied from the specified server.

The **YP** client subsystem is started automatically in */etc/rc* if the directory */var/yp/binding* exists. The client subsystem can be turned on and off by creating or deleting that directory. [ypbind(8)](/ypbind/8.md) will create that directory if run by hand.

The **YP** server subsystem is started automatically in */etc/rc* if the directory */var/yp/DOMAINNAME* exists. This directory is automatically created by [ypinit(8)](/ypinit/8.md) (which initializes the machine as a **YP** server).

If **ypbind** cannot find a server, the system behaves the same way as Sun's code does: it hangs.

## FILES

- */var/yp/Makefile.main*

  Top level YP Makefile

- */var/yp/Makefile.yp*

  YP maps Makefile

## SEE ALSO

[domainname(1)](/domainname/1.md), [ypcat(1)](/ypcat/1.md), [ypmatch(1)](/ypmatch/1.md), [ypwhich(1)](/ypwhich/1.md), [yp\_bind(3)](/yp_bind/3.md), [defaultdomain(5)](/defaultdomain/5.md), [group(5)](/group/5.md), [passwd(5)](/passwd/5.md), [resolv.conf(5)](/resolv.conf/5.md), [Makefile.yp(8)](/Makefile.yp/8.md), [portmap(8)](/portmap/8.md), [ypbind(8)](/ypbind/8.md), [ypinit(8)](/ypinit/8.md), [yppoll(8)](/yppoll/8.md), [yppush(8)](/yppush/8.md), [ypserv(8)](/ypserv/8.md), [ypset(8)](/ypset/8.md), [ypxfr(8)](/ypxfr/8.md)

## HISTORY

This free **YP** subsystem is thought to be compatible with Sun's implementation. It is, of course, not compatible with **NIS+** or any other “secure” **YP** subsystem other than the native one.

The name **YP** stands for Yellow Pee.

The ypbind, most library components, and userland programs were implemented by Theo de Raadt ⟨*deraadt@theos.com*⟩. The current [getpwent(3)](/getpwent/3.md) implementation was done by Jason Downs ⟨*downsj@downsj.com*⟩. The server component was implemented by Mats O Jansson ⟨*moj@stacken.kth.se*⟩.
