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.

problem with account modification in latest cpanel release

Discussion in 'General Discussion' started by LAZer, Feb 18, 2011.

  1. LAZer

    LAZer Well-Known Member

    Joined:
    Jan 18, 2010
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    at net :D
    hi , i have faced a major problem with account modification function in latest release of cpanel/whm - problem happens when i want to rename username of an account.
    ( hopefully i had the fullbackup of my user accounts )

    i use RELEASE Builds (Automatic) which is now WHM 11.28.83

    Modify an Account
    Account Not Modified
    Error.. update of Apache conf failed. Please check the Apache conf.
    Account modification aborted, there was a problem changing the user name.

    i have created apache.conf with
    /scripts/ensure_vhost_includes --all-users
    /scripts/rebuildhttpdconf

    and they returned a httpd.conf build correctly. so i dont think the problem being from httpd.conf

    i have checked httpd.conf after the error when it failed to rename user1 to user2

    root@server2 [/home]# /usr/local/apache/bin/httpd -t
    Warning: DocumentRoot [/home/user1/public_html] does not exist
    httpd: bad user name user1



    for example i have , user1 , in list of accounts , and i want to change the user name to user2 , and there are total of X accounts in user list.

    when i use account modify script there is an error at the end of modification which causes big problem for apache.
    script changes the dir name /home/user1 -->/home/user2,
    also owner and group of the files inside it changes correctly,
    and also it changes the name of the files in
    /var/cpanel/userdata and /var/cpanel/users
    and also in /etc/passwd

    but the problem is with the following changes :
    db name donot change , in /var/lib/mysql , user_db donot change to user1_db
    also in /etc/passwd- , the line of user donot change.

    /etc/shadow and /etc/group changed sometimes.

    then if you do a httpd config rebuild or restart it gives the following error :
    invalid group user2

    and it stops creating httpd.conf and apache fails to restart

    /scripts/rebuildhttpdconf
    /scripts/ensure_vhost_includes --all-users
    fail to create new httpd.conf

    -----
    then in list of accounts there will be no name from those users ! no user1 or no user2
    but the count of accounts donot change and still shows X accounts and not ( x -1 )
    in the terminate accounts they are available but it cannot terminate that

    Terminate an Account

    Account Removal Status: failed (System user [user1] does not exist!)System user [user1] does not exist!

    ---------------
    solution to bring up apache again :

    remove the lines of /etc/passwd , /etc/passwd- , remove files of those users from
    /var/cpanel/users , and /var/cpanel/userdata
    remove anyother trace of the 2 users:
    egrep username /etc/passwd /etc/shadow /etc/group

    ( more info for solution at :
    http://forums.cpanel.net/f5/account-removal-status-failed-user-does-not-exist-153637.html
    whm - Why can't I change cPanel user account name in Web Host Manager? - Server Fault
    )

    delete mysql user :
    # mysql
    # drop user user@localhost;

    drop dns records from whm --> delete a dns zone

    also delete any other trace of files in /var or /etc or /usr
    find /var -name 'user*' -exec rm {} \;
    find /usr -name 'user*' -exec rm {} \;
    find /etc -name 'user*' -exec rm {} \;

    then you can create a test user with the same name user1 and user2 and delete them with account terminate .
    then rebuild httpd.conf and restart apache.
    then restore the fullbackup of your user1 account. :(


    now someone please test to see if this is my problem so that i open a support ticket or is it a bug in new release ? thanks in advanced
     
  2. LAZer

    LAZer Well-Known Member

    Joined:
    Jan 18, 2010
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    at net :D
    here is the error i found in cpanel error_log :

    warn [cpanellogd] User file '/var/cpanel/users/user2' is empty or non-existent. at /usr/local/cpanel/Cpanel/Config/LoadCpUserFile.pm line 106
    Cpanel::Config::LoadCpUserFile::_load('user2', undef, 0) called at /usr/local/cpanel/Cpanel/Config/LoadCpUserFile.pm line 25
    Cpanel::Config::LoadCpUserFile::load('user2') called at /usr/local/cpanel/Cpanel/Config/LoadCpUserFile.pm line 252
    Cpanel::Config::LoadCpUserFile::loadcpuserfile('user2') called at /usr/local/cpanel/Cpanel/Logd.pm line 2521
    Cpanel::Logd::_scanlog_loadcpuser('user2', undef) called at /usr/local/cpanel/Cpanel/Logd.pm line 372
    Cpanel::Logd::scanbandwidth('') called at /usr/local/cpanel/libexec/cpanellogd line 129
     
  3. 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
    Hello LAZer,

    I just tested 11.28.83-RELEASE_51164 machine for this issue by first changing the username for an existing account in WHM > Modify an Account area. The username did change successfully without any errors.

    Next, I created a new account in WHM > Create a New Account area, and then changed the username for that account in WHM > Modify an Account area. Again, that username did change without any errors.

    As such, I cannot reproduce this issue occurring on 11.28.83 on our test machine. Please do open up a ticket in WHM > Support Center > Contact cPanel or using the link that I have in my signature.

    Thanks!
     
  4. LAZer

    LAZer Well-Known Member

    Joined:
    Jan 18, 2010
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    at net :D
    thanks for testing. so this is a problem with my apache httpd.conf
    the strange thing is that i could use this function already without any errors.

    can you update httpd.conf with these 2 commands before modifying the account ?

    /scripts/rebuildhttpdconf
    /scripts/ensure_vhost_includes --all-users

    i think there must be a problem with those included user .conf files then. i`ll test again and read config files and let you know again. thanks
     
  5. winlinuxadmins

    winlinuxadmins Registered

    Joined:
    Feb 19, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    You can goahead and try to first get fresh copy of your cpanel by doing the /scripts/upcp --force and then try the things again
    and also please make sure that Drive and the configuration files like httpd.conf and the /etc/password /etc/shadow are not attributed

    WLA-root
    Winlinuxadmins.com
     
  6. LAZer

    LAZer Well-Known Member

    Joined:
    Jan 18, 2010
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    at net :D
    i have force upgraded the cpanel but no changes. :(
    the strange thing is that when i create a new account , and use modify account script on that , the script works fine. but when i use modify account on my existing users it fails with the same error.
    i dont know what to do , should i open a support ticket or simply forget it ? because i cant try this on my existing users anymore , yesterday i had about 1 hour downtime till ifound the solution :(
     
  7. bhanuprasad1981

    bhanuprasad1981 Well-Known Member

    Joined:
    Aug 5, 2008
    Messages:
    222
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    i encountered such error with an account whose mysql was 5+gb , modification script kept on running for almost 1 hour at last browser stopped.
     
  8. LAZer

    LAZer Well-Known Member

    Joined:
    Jan 18, 2010
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    at net :D
    yes the account which i faced the problem with is a hightraffic account. but now i face the same problem on small accounts even a 50 mb account ! i have created a new account and i`m trying to import the full backup to it.

    i dont know if renaming the file name of a backup can change the name of the restored backup or not?
    for example i have backup of user1.tar.gz and i want to import it as user2 , what should i do ?

    now i have created user2 from whm , and i`m trying to import that fullbackup some how to it . i dont know if it will work or not.
     
  9. bhanuprasad1981

    bhanuprasad1981 Well-Known Member

    Joined:
    Aug 5, 2008
    Messages:
    222
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    my scene was user name was same but domains different , so i created new account and manually copied files/mysql i had no choice :(
     
Loading...

Share This Page