How my problem with CPanel/WHM started
There are several web hosting account administration softwares like Plesk, Ensim and CPanel. I have tried Plesk before and I am quite happy with CPanel right now. CPanel’s Web Host Manager (WHM) is pretty cool but I noticed everything that is related to deleting something, it does not ask you twice to confirm if you really want to delete it. I already made a mistake before when I clicked on Terminate Account and just because of a slip of the mouse and quickly clicking Ok, I noticed that I chose the wrong account and that was the end of it. The account was erased, but good thing I had a back up where I recreated the account and re-uploaded everything.
Now, I have this hosting account where I did DNS entry changes. I started with Edit DNS Zone and added some A Records. But I then realized what I did was wrong. So I wanted to remove the DNS zone entry and decided to click on Delete a DNS Zone. I chose the domain and clicked on Ok and OH NO!!! I thought the next screen will ask me what type of record I will delete and it deleted the whole zone without asking me any confirmation. Well dumb me, it could happen to anyone. Deleting the one entry removed the hosting account from the list of accounts. I then clicked on Add a DNS Zone and I got the DNS zone back for the domain. But it still did not appear in the list of accounts in WHM, but when visited, the account was still live.
The only solution I thought of was, creating a new account on top of it. But I could not create it since WHM was telling me the user already exist. I can’t seem to delete this user and account in WHM since it is no longer listed ever since I deleted the DNS zone. I decided to create one with a new username and just disregard the old username for a while. It worked, I mean creating the account worked.
But when visting the site, it was still pointing to the old username account. I clicked on Terminate an Account hoping I get both usernames deleted. After the terminate account process, I tried to create it again and it still said that the username already exist. So my real problem was deleting this user name and the hosting account attached to it.
How I deleted the user account on Redhat Linux
I was chatting with my friend in the Philippines, Mike Lopez (who made his own warp gate btw), a Linux user told me to SSH to my account and login as root. Then do a deluser. And this is what he uses on his linux distro, Debian. Deluser did not work on Redhat Linux. So he suggested to try rmuser, userrm and all other stuff. All guesses did not work. And while searching online, it was userdel! But that did not solve my problems right away. What I did was:
Login as root:
# userdel username
# rm -r /var/spool/mail/username
# cd /etc
# pico group
Look for the line with the username you want to delete. And delete that line.
I believe my next step was supposed to be:
# rm -r /home/username
But for some reason I chickened out in doing that. I decided to create an account in WHM with the same username and domain. And you will notice you will not have permission to the folders in the created FTP account and also in CPanel, and you have no power to change it. So going back to the root user in SSH, I did a:
# cd /home
# chmod -R 777 username
Went back to WHM, terminated the account and created it again. And now my problem was solved.
This post is not for the Linux gurus out there. This is for the lame Linux guys like me doing dumb mistakes with their own servers. I hope this helped you dumb Linux user like me. *lol* So that problem will never occur to my server again, no worries clients. haha.
Popularity: 3% [?]

Leave a Reply