02-09-2009
UNIX passwords contain a "
salt" in order to create (a bit of) randomness and make them less guessable. To generate a password you usually call the crypt(3) routine with an empty salt. To check a password, you pass the hashed password as the salt to crypt(3), which extracts the salt originally used and uses this to create the other hashed password. If both hashes match, you've got the correct password.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I am getting two input from User for Date from the command prompt when
my script is executed .
The date format i am taking is : DD-MM-YYYY
so is there any method in Unix to validate the two input date.
There might be many cases for these two date to be invalid.... (1 Reply)
Discussion started by: rawatds
1 Replies
2. Shell Programming and Scripting
Im currently working on a Script using PICO editor, the scripts purpose is :
When you typed a certain "word" and press enter, All directories, Script, and any other files that contain that "word" will be displayed.. for example i typed "DOG".. all executable script, Directories, and any other... (3 Replies)
Discussion started by: jenimesh19
3 Replies
3. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Im currently doing a search command.. for example , when i typed a certain word , lets say "DOG".. all... (7 Replies)
Discussion started by: jenimesh19
7 Replies
4. Shell Programming and Scripting
Hello All,
Here I am trying to find all the directories whose name starts with EFS or HOTFIX like in below example and below is my code but I don’t know why this is not working correctly.
drwxr-xr-x 3 qabuild denccefs 4096 Sep 23 21:36 EFS110929A_SOURCE/
-rwxrwxr-x 1 qabuild... (2 Replies)
Discussion started by: anuragpgtgerman
2 Replies
5. AIX
hi guys need some help. when ever i'm login ssh to aix server session always closed.
when trying t0 type wrong password the session still continues, but we tried the correct password it automatically ends.
what could be the problem to this
please see .profile details
... (6 Replies)
Discussion started by: bocha
6 Replies
6. Shell Programming and Scripting
Hi Folks,
I have few mailids in a text file and need to check whether the mailid is in correct format or not.
If just to check whether the string is a mailid or not there is a perl module Email::Valid to do the business or we can implement our own logic.
But the mail_ids I am having is... (4 Replies)
Discussion started by: giridhar276
4 Replies
7. Shell Programming and Scripting
Hi! how do i know if the input is the same as the required date format? the date should be dd/mm/YYYY ex. 2/3/2012 or 15/11/2012
all the following conditions must return an error:
*input of string
*day is > 31 or < 1
*month is > 12 or < 1
*year is < 2013
suppose the date format is stored... (1 Reply)
Discussion started by: angilulu
1 Replies
8. Shell Programming and Scripting
Hi Experts,
path=/db/files/
format=$1
User can enter any file format.compare the user file format with actual file format existed in the directory /db/files. User enter all characters as "A" apart from date format.
example1: user will be entering the file format AAA_AA_YYYYMMDD.AAA
Actual... (6 Replies)
Discussion started by: nalu
6 Replies
9. OS X (Apple)
Hi,
I hope this is the correct section in the forum to post as I'm trying to SSH from my MacBook.
I was looking to see whether ssh on my jailbroken iPhone 6s (10.3.1) still works fine and was following this old reddit guide. I installed OpenSSH&OpenSSL from Cydia and changed the password using... (7 Replies)
Discussion started by: hss1
7 Replies
10. Forum Support Area for Unregistered Users & Account Problems
I cannot login. Already activated my account and entered the correct password but cannot get in.
Then I clicked forget password to set a new one. Upon setting a new one and tried to login, still failed until I repeatedly press the login button which triggered the 15 minutes login barrier. Have... (1 Reply)
Discussion started by: Unregistered
1 Replies
LEARN ABOUT MOJAVE
md5crypt
md5crypt(n) MD5-based password encryption md5crypt(n)
__________________________________________________________________________________________________________________________________________________
NAME
md5crypt - MD5-based password encryption
SYNOPSIS
package require Tcl 8.2
package require md5 2.0
package require md5crypt ?1.1.0?
::md5crypt::md5crypt password salt
::md5crypt::aprcrypt password salt
::md5crypt::salt ?length?
_________________________________________________________________
DESCRIPTION
This package provides an implementation of the MD5-crypt password encryption algorithm as pioneered by FreeBSD and currently in use as a
replacement for the unix crypt(3) function in many modern systems. An implementation of the closely related Apache MD5-crypt is also avail-
able. The output of these commands are compatible with the BSD and OpenSSL implementation of md5crypt and the Apache 2 htpasswd program.
COMMANDS
::md5crypt::md5crypt password salt
Generate a BSD compatible md5-encoded password hash from the plaintext password and a random salt (see SALT).
::md5crypt::aprcrypt password salt
Generate an Apache compatible md5-encoded password hash from the plaintext password and a random salt (see SALT).
::md5crypt::salt ?length?
Generate a random salt string suitable for use with the md5crypt and aprcrypt commands.
SALT
The salt passed to either of the encryption schemes implemented here is checked to see if it begins with the encryption scheme magic string
(either "$1$" for MD5-crypt or "$apr1$" for Apache crypt). If so, this is removed. The remaining characters up to the next $ and up to a
maximum of 8 characters are then used as the salt. The salt text should probably be restricted the set of ASCII alphanumeric characters
plus "./" (dot and forward-slash) - this is to preserve maximum compatability with the unix password file format.
If a password is being generated rather than checked from a password file then the salt command may be used to generate a random salt.
EXAMPLES
% md5crypt::md5crypt password 01234567
$1$01234567$b5lh2mHyD2PdJjFfALlEz1
% md5crypt::aprcrypt password 01234567
$apr1$01234567$IXBaQywhAhc0d75ZbaSDp/
% md5crypt::md5crypt password [md5crypt::salt]
$1$dFmvyRmO$T.V3OmzqeEf3hqJp2WFcb.
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category md5crypt
of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for
either package and/or documentation.
SEE ALSO
md5
KEYWORDS
hashing, md5, md5crypt, message-digest, security
CATEGORY
Hashes, checksums, and encryption
COPYRIGHT
Copyright (c) 2003, Pat Thoyts <patthoyts@users.sourceforge.net>
md5crypt 1.1.0 md5crypt(n)