Where is the password of the user is stored?
Storing Authentication Hashes
Overview: This article describes how UI authentication hashes are stored in the database user table, while SSH authentication hashes are kept in the /etc/shadow file.
The UI authentication hash is stored in the database user table and the SSH authentication hash is stored in the /etc/shadow file.
For Example, we have user tony, the ssh authentication hash is stored in the /etc/shadow file as follows:
[root@localhost ~]# cat /etc/shadow | grep tony
tony:$6$rounds=5607$iky9BM9eKEcCCoSW$yDl/1/VuOOw0H/y6P6jZCi0G22JRF42D5r5Or91cS6VXgsFKymvF/yKaaQh8DJxgvH6UWme/O0la0CyAIOFf8.:19034:0:99999:7:::
The UI authentication hash is stored in the database user table.
To find the UI authentication table log to the database, select the user table, and run the below command:
MariaDB [ezlogin_guhi]> select username,password from lqzu_users where username='tony'\G;
*************************** 1. row ***************************
username: tony
password: $2y$10$f3cPVMQo5CxqiGDXjS3uCe0KIECEwiUZHxkrRHqHi1yqRq7CiVE6K
1 row in set (0.00 sec)
ERROR: No query specified
Related Articles: