The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unable to fetch the cPanel user file

Discussion in 'General Discussion' started by novatech, Jun 8, 2011.

  1. novatech

    novatech Member

    Joined:
    Dec 31, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    When modifying a particular account under Modify Account, the following error occurs when saving:

    "Unable to fetch the cPanel user file for username"

    Any advice?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Please log into root SSH on the machine and do the following:

    Code:
    cd /var/cpanel/users
    ls -lah username
    cat username
    Here replace username with the cPanel username. The correct permissions on the file should look like the following:

    Code:
    -rw-r-----  1 root username  596 Jun  8 14:03 username
    Additionally, inside the file, the USER=username entry should have the username of that user. Some 3rd party plugins modify the username by appending .sometext to the end of the username. This can cause cPanel to be unable to read the user's file.

    If the file does not exist at all, then there would be an issue. You can cat the contents of another user's file in that location to see what it looks like and then copy that to create a new file for that user, modifying the contents to correspond to the right settings for that user.
     
  3. novatech

    novatech Member

    Joined:
    Dec 31, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Perfect, thanks! The USER= actually referenced an old username for this user.
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Was the username changed when transferring the account from one machine to another? I ask as we have an internal case (50545) about the USER= line not changing on transferring an account to a new machine even though everything else does change.

    Please ensure to run this command as well now that you've corrected the USER= line in the /var/cpanel/users/username file:

    Code:
    /scripts/updateuserdomains
     
  5. novatech

    novatech Member

    Joined:
    Dec 31, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    The account was transferred from another cPanel box. I believe the username was changed on the old machine, and then moved. But it wasn't changed as part of the moving process.
     
  6. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    765
    Likes Received:
    1
    Trophy Points:
    18
    Tristan, can you comment on why some plugins would change the details in the USER field? Do you know off hand which plugins do this? Today we had the same problem and it seems the username had been appended with some random text.
     
  7. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    This may be due to a bug we are currently tracking down. Accounts that were transferred in the 11.24 era may have random data appended to the USER field.
     
  8. rjbell4

    rjbell4 Registered

    Joined:
    Mar 23, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I found this thread Googling for the same problem. I migrated some accounts from Plesk/Ensim. All those files have lines like "site7.3ZxffrK8JZKdAJXObKIWWCmYHmayK87O".

    I'll correct all the usernames, and then run /scripts/updateuserdomains. That should be sufficient?
     
  9. elmister

    elmister Active Member

    Joined:
    Mar 2, 2004
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    I'm having the same issue, in this case it's a server thas was migrated from an older cPanel server. It's a cPanel to cPanel migration that was done 23th and 24th October 2010, i don't know the exact cPanel version but i know it had latest Release version, cPanel

    Most or all accounts in that server are having this problem, editing manually each file doesn't seem confortable.

    Note: After checking migration logs in /var/cpanel/logs i found the following

    PHP:
    <title>Web Host Manager 11.26.20 Copy an account from another server</title>
     
  10. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    i am also having the same issue, & this account was not transferred from another cPanel box
    i did follow mentioned steps
     
    #10 crazyaboutlinux, Sep 9, 2011
    Last edited: Sep 10, 2011
  11. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    The username (sglobal) for the file you opened is different than the USER= line in that same file:

    Code:
    USER=sunshine
    Do you see how those don't match?
     
  12. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    yeah got your point thanks lot, my problem is resolved now
     
  13. xtcweb

    xtcweb Member

    Joined:
    Mar 19, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    had to edit quite a few of these files today.

    all affected accounts were initially imported from ensim and probably moved from one cpanel server to another one in the meantime as well.

    everything's fine now :)
     
  14. AbsoluteZero

    AbsoluteZero Member

    Joined:
    Nov 20, 2003
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Thread was a huge help. Thanks all. Just wanted to add a note to this for anyone having the same variant I was. I was getting this error message in the form:

    Code:
    Unable to fetch the cPanel user file for [I]username[/I].jFu8eBofRJWGD_cOgBNdwe8cBF1GItdh
    Sure enough the cd /var/cpanel/users/[USERNAME] file had an entry:
    Code:
    USER=[I]username[/I].jFu8eBofRJWGD_cOgBNdwe8cBF1GItdh
    As soon as this file was edited to delete the long alphanumeric string
    Code:
    USER=username
    everything seems fine. I can't find any relationship between these particular accounts except they're some of the oldest on this server - some going back almost a decade - and I can't recall ever editing them through the WHM, so this could be an issue dating back many years - or perhaps to a previous server migration.
     
Loading...

Share This Page