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.

cpanel wrong user assigned to a domain

Discussion in 'General Discussion' started by rligg, Feb 11, 2013.

  1. rligg

    rligg Well-Known Member

    Joined:
    Sep 16, 2003
    Messages:
    277
    Likes Received:
    0
    Trophy Points:
    16
    I recently moved an addon domain to it's own account. WHM hung and didn't complete when I tried to setup the new user account. So I set it up again with a slightly different username. The problem is that cpanel still associates the old username with the website. Naturally when cpanel updated, it broke the website due to this confusion(changed username, user directory and ip address). I have gone in an edited the following info and removed the old username from /var/cpanel/users/. Is this all I need to do to prevent this from happening on the next recompile or update? I put the user's vhost directive in the pre virtual host directive just in case. Thanks.

    checked and edited files:

    /etc/named.conf
    /var/named/domainname.db
    /etc/localdomains
    /etc/remotedomains
    /etc/trueuserdomains
    /etc/userdomains
    /var/cpanel/users/username (remove the users file)
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,460
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Just curious:
    How did you move it, exactly? Removing it the same way you added it is the best way to go and should work as expected. Once its removed from the account you should have been able to re-add it normally as well.

    That's why I thought I'd ask.
     
  3. rligg

    rligg Well-Known Member

    Joined:
    Sep 16, 2003
    Messages:
    277
    Likes Received:
    0
    Trophy Points:
    16
    I followed the directions posted by cpanel. Removing it was not the problem. The problem was adding the new new account. Cpanel hung up and didn't appear to complete the cycle. Anyway, the username is now changed an all is working. I just have to make sure I have removed every trace of that wrong username so this doesn't happen again. Can you confirm how I do this? I posted to you what I had already done.
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,460
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Sure it was. If it had been removed properly, adding it again would have went smoother for you. What directions did you follow?
     
  5. rligg

    rligg Well-Known Member

    Joined:
    Sep 16, 2003
    Messages:
    277
    Likes Received:
    0
    Trophy Points:
    16
    http://forums.cpanel.net/f5/move-addon-domain-main-domain-161126.html


    These were similar to the cpanel instructions. Anyway there was no problem with the removal. The problem was with creating the new account. What I need to know is now that everything is working, how do I make sure cpanel will not recreate the old user account and associate it with the domain in question when updating?
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,460
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    That's my point I think, the system should have removed all traces of that addon domain when it was removed, properly.

    I'm not sure of a way to "make sure" the system does what its supposed to be doing to begin with.
     
  7. rligg

    rligg Well-Known Member

    Joined:
    Sep 16, 2003
    Messages:
    277
    Likes Received:
    0
    Trophy Points:
    16
    Infopro I appreciate your input. But I think you are overlooking something here. The problem arose when I added the "new" account, not when I removed the addon domain. At this point, what do you propose I do other then telling me I did something wrong? I suppose I will force a cpanel update to see what happens with the account.
     
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,460
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Well, I never said you did anything wrong, I only asked what you did.

    The problem when adding a new account, was created back when you removed the old addon, I think.

    If you can duplicate this issue, I think its a Defect. If that's the case, I propose a ticket to Defects, here:

    http://go.cpanel.net/bugs


    My apologies for not having a proper answer for you.
     
  9. rligg

    rligg Well-Known Member

    Joined:
    Sep 16, 2003
    Messages:
    277
    Likes Received:
    0
    Trophy Points:
    16
    Thanks. I don't think it's a defect though. I created the new account and it seemed like it didn't finish(but it actually did). Then when I tried to create the account again, with a different username, that is when the problem arose. Although I'm not sure how cpanel allowed the same domain on two different user accounts. So I need to remove the first user account I setup that is associated with this domain, which I believe I have. I just need to make sure. I think running a cpanel forced update is the only way to know. Is there a formal procedure for manually removing an account? Thanks.
     
  10. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,460
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    The main account, or the addon? For the main account you'd use Terminate in WHM. Addons are removed from the same interface you add them. In doing so there, it should remove DNS entries and server configurations associated with the addon, but leave files and any databases.


    You might check your settings here:

    Home » Server Configuration » Tweak Settings, Domains tab.

    I can't be sure of course but your description sounds like this:
     
  11. rligg

    rligg Well-Known Member

    Joined:
    Sep 16, 2003
    Messages:
    277
    Likes Received:
    0
    Trophy Points:
    16
    I can confirm that the methods I used in the first post worked for me. The update ran and everything was kept in tact.
     
Loading...

Share This Page