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-...st-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



LinkBack URL
About LinkBacks
Reply With Quote





