How to recover your lost root password in CentOS

Here is a handy report on how to reset your root password if you have console access. How to recover your lost root password In CentOS, it’s possible to have the scripts that run from the initramfs debug the shell at certain points, provide a root shell, and continue when that shell exists. First, reboot… Continue reading How to recover your lost root password in CentOS

How to enable second level quotas on SolusVM with OpenVZ

Fixing already provisioned VMs What about VMs already provisioned? First, the container must be powered off, then issue the vzctl set “VMID” –quotaugidlimit 1000 –save. Note that “VMID” is a placeholder for the container ID. Then start the container and you will have the second quotas enabled for use. Fixing cPanel Quotas Once you have… Continue reading How to enable second level quotas on SolusVM with OpenVZ

How do I get the size of a directory on the command line?

du -sh file_path Explanation du command estimates file_path space usage The options -sh are (from man du): -s, –summarize display only a total for each argument -h, –human-readable print sizes in human readable format (e.g., 1K 234M 2G) To check more than one directory and see the total, use du -sch: -c, –total produce a… Continue reading How do I get the size of a directory on the command line?