mknetid(8)

mknetid8

Generate a yp map of group and domain memberships

Usage

mknetid [-q] [-d domain] [-g groupfile] [-h hostfile] [-m netidfile] [-P master.passwdfile] [-p passwdfile]

Overview

The mknetid utility combines information from the passwd(5), group(5), hosts(5), and netid(5) files, printing it in netid(5) format to the standard output. If the passwd(5) file is not available, the master.passwd(5) file is used instead. The netid(5) file is optional and does not need to exist.

The most common application is to pass the output to makedbm(8) in order to create a netid.byname map for the yp(8) subsystem.

The options are as follows:

-d domain

Use domain instead of the default domainname(1).

-g groupfile

Use groupfile instead of /etc/group.

-h hostfile

Use hostfile instead of /etc/hosts.

-m netidfile

Use netidfile instead of /etc/netid.

-P master.passwdfile

Use master.passwdfile instead of /etc/master.passwd.

-p passwdfile

Use passwdfile instead of /etc/passwd.

-q

Keep quiet about multiple occurrences of a user ID. Ignore all but the first.

Files

/etc/passwd
/etc/master.passwd
/etc/group
/etc/hosts
/etc/netid

Releases

61 releases since OpenBSD 2.1; the text changed 10 times.

  1. 2.1–2.4
  2. 2.5
  3. 2.6
  4. 2.7–2.8
  5. 2.9
  6. 3.0–3.2
  7. 3.3
  8. 3.4–4.1
  9. 4.2–4.6
  10. 4.7–5.3
  11. 5.4–8.0

-P since OpenBSD 4.7.

Authors

Mats O Jansson ⟨[email protected]⟩

From man 8.0-current-20261101 in OpenBSD 8.0-current (2026-11-01). Parsed by carta from the page's mdoc source.