[ Previous ] [ Contents ] [ Index ] [ Next ]

ns_crypt

Overview

Encrypt password

Syntax

ns_crypt key salt

Description

ns_crypt encrypts the key using the salt and returns the result. It uses the same algorithm as the Unix crypt command. Normally key is the user's password and salt is a two-character code used to encrypt the key.

Example

Suppose you have a user nevsky with a password alexander. Nevsky's /etc/passwd entry might look like:

    nevsky:/gteiXVtAXVqQ:28:1:Musician:/:/bin/sh

The first two characters of the encrypted password are the SALT. Since

    ns_crypt /g alexander

returns /gte...Q, then alexander is the correct password.

See Also

crypt(3) (Unix library function)

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1998-99 America Online, Inc.