Hello,

Is there any way to decrypt “Cpanel password. I know that the cPanel user is listed in “/etc/passwd” and password is encrypted in the “/etc/shadow”. If some one forgets the password the only option available is to reset the password. Is there any option to view the password without resetting it?

Solution:

Copy paste the script and run the script by changing the file permission to 755. This bash script used to decrypt the password.

#!/bin/bash
/*
* shadow.c – gcc -o shadow shadow.c
* run as root – shadow > passwd.file
*/
#include &lgt;pwd.h>
main()
{
struct passwd *p;
while(p=getpwent())
printf(“%s:%s:%d:%d:%s:%s:%s\n”,
p-> pw_name, /* account name */
p-> pw_passwd, /* hash */
p-> pw_uid, /* user id */
p-> pw_gid, /* group id */
p-> pw_gecos, /* gecos field */
p-> pw_dir, /* home dir */
p-> pw_shell); /* shell (typically) */
}

Leave a Reply