ns_crypt(3aolserver) AOLserver Built-In Commands ns_crypt(3aolserver)__________________________________________________________________________________________________________________________________________________NAME
ns_crypt - commands
SYNOPSIS
ns_crypt key salt
_________________________________________________________________DESCRIPTION
ns_crypt encrypted the key, also known as the password, using the salt and returns the result. It uses the same algorithm as the unix
crypt command.
The result from ns_crypt is a 13-character string. The first two characters correspond to the salt, and the remaining eleven characters
correspond to the password encrypted with the specified salt.
The password is a string (typically that of a password to be used for nscp and/or nsperm authentication).
salt should be two characters, typically from the set [a-zA-Z0-9./]. If the empty string is specified as the salt then ns_crypt returns
the empty string. If a string longer than two characters is specified for the salt it is truncated to two characters. If a one character
salt is provided the output will appear to have a two-character salt (the single character repeated), however, the encrypted value does not
correspond to the same password being encrypted with the equivalent two character salt. (As a result sticking with a two character salt is
highly recommended.)
Input to ns_crypt is case-sensitive.
EXAMPLES
nscp> ns_crypt aolserver ns
ns0WvClsyIL4A
nscp> ns_crypt aolserver NS
NSDQ1dPM.409Q
nscp> ns_crypt aolserver tcl
tcAbgtlzbEhVc
nscp> ns_crypt aolserver tc
tcAbgtlzbEhVc
nscp> ns_crypt aolserver ..
..7TNvXHLxJ9Y
nscp> ns_crypt aolserver .
..fwmBaZuzrRs
SEE ALSO nsd(1), info(n), nscp, nsperm, crypt(3)KEYWORDS AOLserver 4.0 ns_crypt(3aolserver)
Check Out this Related Man Page
CRYPT(3) Library Functions Manual CRYPT(3)NAME
crypt - one-way password encryption function
SYNOPSIS
#define _MINIX_SOURCE 1
#include <unistd.h>
char *crypt(const char *key, const char *salt)
DESCRIPTION
The first use of crypt() is to encrypt a password. Its second use is to authenticate a shadow password. In both cases crypt() calls
pwdauth(8) to do the real work.
Crypt() encrypts a password if called with a user typed key, and a salt whose first two characters are in the set [./0-9A-Za-z]. The
result is a character string in the [./0-9A-Za-z] alphabet of which the first two characters are equal to the salt, and the rest is the
result of encrypting the key and the salt.
If crypt() is called with a salt that has the form ##user then the key is encrypted and compared to the encrypted password of user in the
shadow password file. If they are equal then crypt() returns the ##user argument, if not then some other string is returned. This trick
assures that the normal way to authenticate a password still works:
if (strcmp(pw->pw_passwd, crypt(key, pw->pw_passwd))) ...
If key is a null string, and the shadow password is a null string or the salt is a null string then the result equals salt. (This is
because the caller can't tell if a password field is empty in the shadow password file.)
The key and salt are limited to 1024 bytes total including the null bytes.
FILES
/usr/lib/pwdauth The password authentication program
SEE ALSO getpass(3), getpwent(3), passwd(5), pwdauth(8).
NOTES
The result of an encryption is returned in a static array that is overwritten by each call. The return value should not be modified.
AUTHOR
Kees J. Bot (kjb@cs.vu.nl)
CRYPT(3)
Hi,
Could anybody explain how to change the character set of a particular string in C in unix. we are using HP-UX as OS. We require to change the input string which is in cp1250 format to utf-8.
A sample code would help. Thnx in advance (1 Reply)
Hi All,
I have the file in the following format.I need to change the password "tomcat","admin","mgr" and "testing" in the file with the encrypted passwords.
The encrypted passwords are given to me by another script.
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role... (22 Replies)
Hi, lads. Good day.
I have one question to ask.
I read on the Internet, for the SUSE system, the password is encrypted into 13 characters, and the first 2 characters are called salt characters? Is there any special meaning for salt? Why we need these salt characters?
And, I have a look at... (1 Reply)
Unix protect its password by using salt
It that mean larger the salt size the more secure?
if the salt size increase greatly, will the password still able to be cracked?
thank you for helping (1 Reply)
Hi,
I've been reading up on using a salt value when creating a password to make it more secure, what I can't get my head round is how do you remember this salt value?
I'm guessing that when a user logs in to be able to compare the password entered with the one in the database you... (2 Replies)