Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    cPanel Partner NOC cPanel Partner NOC Badge RSimoes's Avatar
    Join Date
    Oct 2008
    Location
    Austin, TX
    Posts
    18

    Default Getting a user's password from %USERDATA

    I see that the %Cpanel::USERDATA hashtable has a "pass" key, but this doesn't seem to ever have a value. Is there a reliable way to get a user's password, while logged in as the user, from %USERDATA or some other variable? I know when using PHP there is the $_SERVER array, but what about for Perl?

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge RSimoes's Avatar
    Join Date
    Oct 2008
    Location
    Austin, TX
    Posts
    18

    Default

    I tested retrieving the user's password from a few different sources:
    • The key-value pairs of the $_SERVER associative array in PHP
    • The output of the Linux "env" command via PHP's shell_exec() function
    • The key-value pairs of %Cpanel::USERDATA in Perl
    • The password array element straight from Cpanel::PwCache::getpwnam() in Perl
    • The output of Linux's "env" command via Perl backticks

    The password showed up in both the PHP methods, and none of the Perl methods (returned a value of empty string for the REMOTE_PASSWORD key). So unless this is working as intended, I'd like to file a bug report.
    Last edited by RSimoes; 01-22-2010 at 08:46 PM.

Similar Threads & Tags
Similar threads

  1. /var/cpanel/userdata/ rebuild?
    By Mike2Own in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-28-2008, 02:21 PM
  2. DirectoryIndex directives in userdata being ignored after EA3?
    By mtindor in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 10-25-2007, 04:01 PM
  3. Error in obtaining userdata [moved]
    By crazynipples in forum Database Discussions
    Replies: 1
    Last Post: 06-10-2006, 03:19 PM
  4. Error in obtaining userdata
    By crazynipples in forum Database Discussions
    Replies: 2
    Last Post: 06-08-2006, 06:06 PM
  5. Changing user password changes mysql password
    By shacker23 in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-16-2005, 01:07 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube