LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to find encryption type ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-find-encryption-type-843958/)

PoleStar 11-12-2010 04:07 PM

how to find encryption type ?
 
I used this password Pass1234
when I search password stored its Nh2yEjhdHIwtY

Can some one please tell me what kind of encryption is used?

I thought it was crypt() , but when I create crpypt on my local machine its different.

Any ideas.

GrapefruiTgirl 11-12-2010 05:19 PM

Not sure, but here's a few hints..

Telling us what application, context, OS and/or circumstance you entered this username and password into, as well as (very big hint!!) the storage location (filename!) where you located the encrypted password, would almost certainly be enough information for some folks around here to tell you what encryption method is being used. In fact, especially in case of an open source application, you could probably determine the encryption type yourself, by Googling a little bit and/or looking at the sourcecode of the application.

For example, if you find the encrypted password in the /etc/shadow file, that'd be a great clue, and a step towards the answer.

Perhaps reading the crypt() manpage again, will possibly explain why the password generated on your local machine, is different.

PoleStar 11-13-2010 06:08 PM

Well, I need a script which can add values(CN, attributes etc) in AD from Linux box, that script also need to add/replace password in AD.
I found out AD uses mssfu30password field. And I assumed(after) lot of internet research and very with little results, that this should work

Code:

my $cpwd = crypt($newpwd, $salt);
But what I noticed is.

The hash create this way and into add field mssfu30password on AD does not work, (wrong password error upon trying to log to windows) When I create password from ad/windows interface it still create 13 value figure which looks like it is created with crypt().

Now also if I use first 2 alphabets of the hash/enrypted-password created by windows it self, and use as salt with the newly set password on windows, It create a different value on my Linux box.

neonsignal 11-13-2010 07:36 PM

If I run:

Code:

perl -e 'print crypt("Pass1234", "Nh");'
I get
Code:

Nh2yEjhdHIwtY
which matches the example you gave.

Is it possible you have a newline at the end of your password, or something like that?


All times are GMT -5. The time now is 03:51 AM.