From root it is possible to set a single character password for any account
Example:
Here I created a account test3 and set the password t, and the password is accepted
[root@localhost ~]# useradd test3
[root@localhost ~]# passwd test3
Changing password for user test3.
New password:
BAD PASSWORD: it is WAY too short
BAD PASSWORD: is a palindrome
Retype new password:
passwd: all authentication tokens updated successfully.
But when it comes to regular user-mode it is very difficult change a password. Check this example
[avi@localhost ~]$ su - test3
Password:
[test3@localhost ~]$ passwd
Changing password for user test3.
Changing password for test3.
(current) UNIX password:
New password:
BAD PASSWORD: it is based on a dictionary word
Password:
passwd: Authentication token manipulation error
I logged into that account and tried to change the password, but this time it not taking simple password, I just knew that its because of pam (Pluggable authentication module ie: /etc/pam.d/)
What changes I do to set any password from regular user? Like being root if we give any password it will accept even single character also. I want that method in user-mode also
I know it's crazy but I want to learn that's it. I am using CentOS 6.2
