View previous topic :: View next topic |
Author |
Message |
lazna -
Joined: 16 Aug 2015 Posts: 52
|
Posted: Sun Feb 24, 2019 9:27 pm Post subject: abyss.conf - password encryption |
|
|
Trying to create user programmatically but password encryption does not work as described here (in 15 years old post) https://aprelium.com/forum/viewtopic.php?p=11088#11088
have created 'testuser' with password 'testuser' from GUI and it have password hash:
7bf1fcd6b1d5852e78e994f436d39612
but if perform command: 'echo testuser:testuser|md5sums.exe' got
114FB1223597FA6D2CB07519E9178100
Does method of password encryption change in the meantime?
Abyss Web Server X1 (v 2.12)
L. |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1298
|
Posted: Fri Mar 01, 2019 6:14 pm Post subject: Re: abyss.conf - password encryption |
|
|
lazna,
Try instead:
Code: |
echo -n "testuser:testuser" | md5sum |
the echo command adds end of line and carriage return chars when called without -n. These invisible characters change the md5 sum. _________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
Back to top |
|
|
lazna -
Joined: 16 Aug 2015 Posts: 52
|
Posted: Fri Mar 01, 2019 11:28 pm Post subject: |
|
|
Thanks for reply.
I am on windows where echo does not accept parameters, but there is a way how to echo string without newline:
https://stackoverflow.com/questions/7105433/windows-batch-echo-without-new-line
tested this does not create trailing CRLF
---------------
echo|set /p="testuser:testuser"
testuser:testuser
---------------
but this does not help:
echo|set /p="testuser:testuser"| md5sums.exe
f9f0c452e6df5dd6cc3c5807f03f5517 *-
Any other idea?
L. |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1298
|
|
Back to top |
|
|
lazna -
Joined: 16 Aug 2015 Posts: 52
|
Posted: Thu Mar 14, 2019 6:14 pm Post subject: SOLVED |
|
|
So finaly, following commands chain give me identical string as one generated by program if user is added from GUI for username: 'testuser' and passwd 'testuser'
echo|set /p="testuser:testuser" | base64.exe -e | md5sums.exe
The glitch with "echo|set /p.........." is present to supress trailing CRLF.
Used external utilities:
http://www.f2ko.de/en/b64.php
MD5sums.exe from http://gnuwin32.sourceforge.net/packages/coreutils.htm package |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1298
|
Posted: Thu Mar 21, 2019 4:50 pm Post subject: Re: SOLVED |
|
|
lazna,
Thank you for getting back with the detailed list of tools that you've used.
As a side note, Windows scripting is painful. :) _________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
Back to top |
|
|
lazna -
Joined: 16 Aug 2015 Posts: 52
|
Posted: Wed Apr 03, 2019 9:40 am Post subject: Re: SOLVED |
|
|
admin wrote: | lazna,
Thank you for getting back with the detailed list of tools that you've used.
|
You are welcome. Could you please edit your post with wrong algorithm accordingly? To prevent mislead other people in the future..
Quote: |
As a side note, Windows scripting is painful
|
Is not, there are TONS of console utilities writen for Win32 since 1995 when Win95 was released. When I have proper algorithm, than is 10 minute job to asseble suitable utilities into chain.
Windows console abilities are heavily underestimated. And Microsoft still working on it: https://devblogs.microsoft.com/commandline/ |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1298
|
Posted: Thu Apr 04, 2019 3:36 pm Post subject: Re: SOLVED |
|
|
lazna wrote: | You are welcome. Could you please edit your post with wrong algorithm accordingly? To prevent mislead other people in the future.. |
Edited and fixed as you've suggested.
Quote: | Is not, there are TONS of console utilities writen for Win32 since 1995 when Win95 was released. When I have proper algorithm, than is 10 minute job to asseble suitable utilities into chain.
Windows console abilities are heavily underestimated. And Microsoft still working on it: https://devblogs.microsoft.com/commandline/ |
Thank you for the URL. _________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
Back to top |
|
|
|