---
name: "wn_md5passwd"
section: "8"
platform: "linux"
package: "wn"
version: "2.2.9-2"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/wn_md5passwd"
---

# wn\_md5passwd(8)

create and manage MD5 password files for wn HTTP server

## NAME

wn\_md5passwd - create and manage MD5 password files for wn HTTP server

## SYNOPSIS

**wn\_md5passwd** \[**-n** \[**-D**\] \|**-d** \[**-D**\] \] \[ *passwd\_file*\]

## DESCRIPTION

**wn\_md5passwd** is a [**perl**(1)](/perl/1.md) program that is part of the [**wn**(1)](/wn/1.md) HTTP server package.  It is used to create and manage password files for authenticating a user through "Basic" authentication described in the HTTP protocol.  The password are encrypted using the RSA Data Security Inc. **(**http://www.rsa.com/**)** MD5 Message Digest algorithm as implemented in the [**md5sum**(1)](/md5sum/1.md) utility that is part of the Debian [**dpkg**(8)](/dpkg/8.md) package.

An alternative is the [**wn\_mkpasswd**(8)](/wn_mkpasswd/8.md) utility which encrypts the password using the standard Data Encryption Standard (DES) algorithm **(**http://www.itl.nist.gov/fipspubs/fip46-2.htm**)** as implemented in the [**perl**(1)](/perl/1.md) builtin function [**perlfunc**(1p)](/perlfunc/1p.md).

**wn\_md5passwd** should be used the first time to create the password file:

```
        wn_md5passwd -n passwd_file
```

This prompts you for a user name and password and then creates a password file called *passwd\_file* with that entry. On subsequent uses the **-n** argument should be omitted so that entries will be added to the existing file instead of starting a new one.  If a subsequent entry is made with the same user name the entry for that user will be replaced. If the *passwd\_file* argument is omitted then the default name of *wn\_md5passwd* is used.

There is another optional argument which may be used with this program. The command:

```
        wn_md5passwd -n -D passwd_file
```

causes a UNIX DBM database to be created or used instead of a simple flat file.  This is very useful if you have a very large number of password entries. The database resides in the two *passwd\_file.dir* and *passwd\_file.pag* files.  To create a new database you must remove or rename the *.pag* and *.dir* files.

To remove a single entry from a password file use the command:

```
        wn_md5passwd -d passwd_file
```

or

```
        wn_md5passwd -d -D passwd_file
```

for a UNIX DBM database.

Once you have created your password file and made sure that it is readable by the user id under which the [**wn**(1)](/wn/1.md) server will run, you are ready to set up the [**wnauth**(3)](/wnauth/3.md) authentication module.  This is done on a per directory basis by three entries in directory record of the *index* file (see **http:/doc/wn/access.html**).

## WARNING

I would strongly advise against using basic authentication described here to protect sensitive information on a server which runs on system on which untrusted users have accounts.  The "Basic" authentication protocol sends passwords across the network with no encryption. Specifically, you should not use the host password file */etc/passwd* as the [**wn**(1)](/wn/1.md) password file.

## OPTIONS

- **-D**

  Use UNIX DBM database instead of flat file.

- **-d**

  \[ *passwd\_file* \]

  Delete a user from the *passwd\_file* if the user exists.  If *passwd\_file* is not supplied the default *wn\_md5passwd* is used instead.  If the password file is a UNIX DBM database, the **-D** must also be provided.

- **-n**

  \[ *passwd\_file* \]

  Create new password database *passwd\_file* or *wn\_md5passwd* if optional argument is not supplied.  If the **-D** option is also supplied, a UNIX DBM database consisting of the files *passwd\_file.dir* and *passwd\_file.pag* is created instead.

## FILES

- *passwd\_file*

  \[ **.dir** \| **.pag** \]

  Database of users and corresponding passwords.

## SEE ALSO

[**wn**(1)](/wn/1.md), [**wn\_mkdigest**(1)](/wn_mkdigest/1.md), [**wn\_uncache**(1)](/wn_uncache/1.md), [**wndex**(1)](/wndex/1.md), [**wnindexmaker**(1)](/wnindexmaker/1.md), [**wnpnuts**(1)](/wnpnuts/1.md), [**wnauth**(3)](/wnauth/3.md), [**wncat**(3)](/wncat/3.md), [**wnhtmlify**(3)](/wnhtmlify/3.md), [**wnredir**(3)](/wnredir/3.md), [**wnsectsearch**(3)](/wnsectsearch/3.md), [**wnseven\_m**(3)](/wnseven_m/3.md), [**wn\_mkpasswd**(8)](/wn_mkpasswd/8.md), [**wnconfig**(8)](/wnconfig/8.md), [**wnd**(8)](/wnd/8.md), [**wnsd**(8)](/wnsd/8.md), [**wnupdatewww**(8)](/wnupdatewww/8.md), [**wnv2c**(8)](/wnv2c/8.md)\
 [**dpkg**(8)](/dpkg/8.md)\
 **http:/doc/wn/access.html**\
 **http:/doc/wn/manual.html**\
 **http://hopf.math.nwu.edu/**

## AUTHOR

**wn** is written by John Franks \<john@math.nwu.edu\>.  Modified by Jean Pierre LeJacq \<jplejacq@quoininc.com\> as part of packaging for the Debian GNU/Linux distribution. Manual page also added by Jean Pierre LeJacq.
