Am 19.08.17 um 11:22 AM schrieb Roderick:
I read in doc/html/manual/files/admin-maintenance.html
....
To encrypt a password, you can copy an already-encrypted password from
the /etc/passwd file or run the bin/nspasswd utility. It will prompt
you for a password and return the encrypted version of the password.
<<
This part is outdated (I've just committed an updated version for the
next release)
The crypted hash can be created within NaviServer (e.g. running nsd -c)
with ns_crypt [1]
% ns_crypt "password" ".."]
..UZoIyj/Hy/c
or from the shell using e.g. Perl
perl -le 'print crypt("password", "..");'
The value stored in the password file is not the password, but
essentially a the "salt"
followed by the hash. The entry follows the "good old" Unix convention of
using a random 2 char "salt":
nsadmin:CUdnvgBYocLSI:::::
For this hash, the salt is "CU". To check the hash, one has to know the
password (here "x") and has to compute the hash with the given salt:
% ns_crypt "x" "CU"
CUdnvgBYocLSI
Most unix systems store nowadays the hash in /etc/passwd, so this
comment is dropped in the updated documentation.
Hope, this helps
-gn
[1] https://naviserver.sourceforge.io/n/naviserver/files/ns_crypt.html
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel