Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Unix Password Encryption Procedure
Hello,

I know that most Unix machines either use the DES encryption algorithm
or the MD5 encryption algorithm, I am wondering if there is any
flavour of unix which uses the kerberos (or anyother) methodology?

Additonally, I know that the function crypt() is able to encrypt using
either the DES or the MD5 algorithm, depending on the salt supplied
with the function.  I am curious as to given an encrypted string, is
there any "clean" (via a function(s)) way to determine what method was
used to encrypt the original string.  I need to know how the original
string was encrypted so that I can use the same procedure to encrypt
the entered string (so that I may compare the stored and entered
strings).

Thanks,

Kushal

Report this thread to moderator Post Follow-up to this message
Old Post
Kushal Agarwal
09-28-04 02:01 AM


Re: Unix Password Encryption Procedure
kushal.agarwal@gmail.com (Kushal Agarwal) writes:

> Hello,
>
> I know that most Unix machines either use the DES encryption algorithm
> or the MD5 encryption algorithm, I am wondering if there is any
> flavour of unix which uses the kerberos (or anyother) methodology?

Any Unix can be configured to use any authentication method, if not
otherwise, by replacing /bin/login.  As for kerberos, it is widely
used on most Unix flavors.

--
Måns Rullgård
mru@mru.ath.cx

Report this thread to moderator Post Follow-up to this message
Old Post
Måns Rullgård
09-28-04 02:01 AM


Re: Unix Password Encryption Procedure
kushal.agarwal@gmail.com (Kushal Agarwal) wrote in message news:<e9d0a198.0409271240.1569a6
c9@posting.google.com>...
> Hello,
>
> I know that most Unix machines either use the DES encryption algorithm
> or the MD5 encryption algorithm, I am wondering if there is any
> flavour of unix which uses the kerberos (or anyother) methodology?

On most modern systems, this kind of stuff is controlled by PAM (see
man pam). Using kerberos is only a matter of plugging a suitable
module into the stack, eg on Solaris the stack looks like that:

rc@ddp02:~ $ egrep '^login|#login' /etc/pam.conf
login   auth requisite          pam_authtok_get.so.1
login   auth required           pam_dhkeys.so.1
login   auth required           pam_unix_auth.so.1
login   auth required           pam_dial_auth.so.1
# Support for Kerberos V5 authentication (uncomment to use Kerberos)
#login  auth optional           pam_krb5.so.1 try_first_pass

Your questions about MD5 indicates that you might be using Linux, so
maybe here's a good read for you:
http://www.kernel.org/pub/linux/lib...Linux-PAM-html/

>
> Additonally, I know that the function crypt() is able to encrypt using
> either the DES or the MD5 algorithm, depending on the salt supplied
> with the function.  I am curious as to given an encrypted string, is
> there any "clean" (via a function(s)) way to determine what method was
> used to encrypt the original string.  I need to know how the original
> string was encrypted so that I can use the same procedure to encrypt
> the entered string (so that I may compare the stored and entered
> strings).
>

The MD5 encryption is usually handled by a GNU extension in the crpyt
library.
The section GNU EXTENSION in the crypt manpage on linux says:

"If  salt is a character string starting with the three characters
"$1$" followed by at most eight characters, and optionally  terminated
by  "$", then instead of using the DES machine, the glibc crypt
function uses an MD5-based algorithm..."

So if your encrypted string starts with $1$, it's MD5.

HTH
Christian Ramseyer

Report this thread to moderator Post Follow-up to this message
Old Post
rc
09-28-04 02:04 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Unix Programming archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:34 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.