Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Different output, same username and password

Tags:

.htpasswd

I was wondering why even for the same username and the same password, htpasswd outputs a new hash everytime? I tried finding an answer to this question, but couldn't.

like image 338
user225312 Avatar asked May 18 '10 11:05

user225312


People also ask

Can the password and the username be the same?

More than one user can theoretically have the same password, although if they do, that usually indicates that both users have picked a bad password. A username can be any sequence of characters you want (with some exceptions), and does not necessarily correspond to a real person's name.

What role do the username and password play in logging into an email account?

A username is almost always paired with a password. This username/password combination is referred to as a login, and is often required for users to log in to websites. For example, to access your e-mail via the Web, you are required to enter your username and password.

What type of authentication is a username and a password?

Password-based authentication Also known as knowledge-based authentication, password-based authentication relies on a username and password or PIN. The most common authentication method, anyone who has logged in to a computer knows how to use a password.

How do usernames and passwords work?

Step 1 – A user visits a site and fills in a form to create their username and password. Step 2 – That password is put through a hash function and the hash is stored in the database. Step 3 – When a user logs in they enter their password again on the site.


1 Answers

The passwords generated by "htpasswd" use a random salt, to make it harder to guess. It also means that pre-crypted dictionaries for attacks have to be much larger since they have to crypt every possible password with every possible salt.

htpasswd uses crypt(3) behind the scenes.

like image 127
Paul Tomblin Avatar answered Oct 14 '22 06:10

Paul Tomblin