from: http://cpanel.net/system-administrators/command-line-scripts/
Prefer Command Line to a GUI? You Can Access 98 Percent of WHM Functionality From the Command Line
Using one many automation scripts available in the /scripts folder, allows you to quickly configure, troubleshoot and execute powerful commands on your cPanel & WHM server by using one of the many automation scripts available in the scripts folder. Here are some of the more popular command line scripts available via cPanel & WHM:
- easyapache
- This powerful script allows you to compile, upgrade, and re-install Apache, PHP, and various modules. EasyApache makes it simple to run multiple PHP versions on your server and compile Apache and PHP modules.
- check_cpanel_rpms
- The check_cpanel_rpms script validates cPanel-managed RPMs and provides a way to reinstall these RPMs if they have been altered.
- *up
- The *up script is used to manually update the various services on your cPanel & WHM server using various forms such as mysqlup, phpup and eximup. Although you can configure your services to update with cPanel, *up can be used for finer control.
- restartsrv_*
- The restartsrv_* script can be used to manually restart the various services on your cPanel server. This is the recommended method for restarting services through SSH.
- addpop
- The addpop script can be used to add pop email addresses through SSH. Through interactive prompts, addpop will create the new address and set the email address password under the proper user account.
- delpop
- The delpop scripts can be used to remove email accounts through SSH. Similar to the addpop script, delpop will remove the email address from the proper account.
- wwwacct
- The wwwacct script can be used to create accounts for your cPanel & WHM server. We’ve made this script full-featured in that you can define all of the parameters for the new account as you would through WHM.
- killpkg
- The killpkg account can be used in similar fashion as the wwwacct script to automate removal of accounts.
- restorepkg
- The restorepkg script can be used to manually restore an account from backup.
- cpbackup
- The cpbackup script can be used to manually trigger system wide backups on your cPanel & WHM server.
- pkgacct
- The pkgacct script is used within the cpbackup script and can be manually executed to create specific account or system wide backups.
- upcp
- The upcp script can be used to trigger the update process on your server. You can also configure whether you want server software and the OS updated by the upcp script.
- setupmailserver
- The setupmailserver script allows you to switch between courier and dovecot, or disable POP3 and IMAP functionality altogether.
- setupftpserver
- The setupftpserver script allows you to switch between pure-ftpd and proftpd, or disable ftp functionality altogether.
- setupnameserver
- The setupnameserver script allows you to switch between bind and nsd, or disable nameserver functions altogether.
- suspendacct
- The suspendacct script can be used to automate suspension of accounts on your cPanel & WHM server.
- unsuspendacct
- The unsuspendacct script can be used to automate unsuspension of accounts on your cPanel & WHM server.
Using a combination of these scripts, you can automate tasks on your cPanel & WHM server to meet your specific hosting needs.
New tab in Firefox don’t show previously visited websites in thumbnails »« Don’t let your laptop overheat in your backpack!
from my favorite disk imaging program support website, a very helpful guide to fixing disk read or write errors due to glitchy items like bad IDE cables: http://www.terabyteunlimited.com/kb/article.php?id=152
Image Validation Fails with Image Stream Corrupt or Byte-for-Byte Validation Failure Message
This problem can be caused by overclocking, overheating, a hardware problem, or a BIOS or firmware bug or configuration issue.
To determine if the mainboard, memory, or CPU is at fault:
- Download and run either the Microsoft Windows Memory Diagnostic or memtest86 (or try both of them).
- If you use the Windows Memory Diagnostic, run the extended tests overnight.
- If you use memtest86, run all seven of the default tests and allow it to run overnight.
If the memory diagnostic does not report any errors, check the following:
If none of the above helps, the problem may be due to weak sectors on the drive surface. If the issue you are having involves a hard drive, download and run the hard drive manufacturer’s diagnostic utility or a third-party utility designed to scan and repair hard disk surfaces. Below are links to some major hard drive manufacturer’s home pages:
ExcelStor
Fujitsu
Hitachi
Seagate/Maxtor
Samsung
Seagate
Sony
Toshiba
Western Digital
If you still have not narrowed down the problem, try adjusting the system BIOS parameters below, for the drive(s) with which you are experiencing the problem. These settings, if available, are typically found under “Integrated Peripherals” or in the “Drive Configuration” section.
- Disable “Block mode”
- Disable “32-bit access”
- Switch to a different PIO mode
- Switch to a lower UDMA mode, if using UDMA
Apache httpd.conf – ServerSignature Off ServerTokens Prod »« Linux root password for live session
If you have the error on a linux system: “error splicing file permission denied” while trying to move, copy or delete a file, most likely you are trying to copy a windows encrypted file. It will not show as encrypted in linux and the permissions will look exactly as your others that do copy properly.
The best way to take care of this is to boot into windows that encrypted the file in the first place, and right click “properties”, then uncheck “encrypted”. The files will decrypt if you logged in the windows that originally encrypted it.
I had accidentally done this and the only way I noticed was the file copy error in Ubuntu, then when booting to windows, the particular folder full of files were all in green text instead of black. If they were in blue, that would mean that they are compressed.
Does google count cached page hits in my analytics? »« Advanced SEO overview:
sudo passwd ubuntu
Then create your password, you will need to already be in Terminal
Ubuntu user: You will have to sudo once you login to do anything powerful
ubuntu default root password:
To create a usable root user’s account on a live cd, you can set the root password then su. This has not been possible in previous versions of Ubuntu as their user model made you remember to sudo before each command requiring root access.
sudo passwd root
It’s easier just to sudo command for one time use, instead of creating a root user to su to.
As of Ubuntu 9.10, I haven’t been able to login with “demo” or “Ubuntu” as the password for live session username “Ubuntu”.
If you are running most other types of linux like Debian, Red Hat, Mepis, Suse and others, they have an actual root user with an account.
It is easier to gain root access permanently, for these other flavors of Linux click here to learn how.
If you’ve forgot your root password and need to reset it, Make Magazine has a nice writeup here:
HOWTO – reset a lost Ubuntu password
Email bounces – creating SPF records and rDNS »« Cannot see other computers on network
To see if you’re running Nvidia or ATI Radeon drivers in Linux:
glxgears -printfps to see framerate (Mepis 6.5)
To edit or change xorg.conf, your video card and video driver settings in linux:
Drop to CTRL-ALT-F1 if you have to.
First I backup /etc/X11/xorg.conf to xorg-backup.conf then edit the file to usually drop to a lower resolution which is the one listed for 24 bit depth.
If you really cannot deal with that, you can take your chances with the tool:
sudo dpkg-reconfigure xserver-xorg
Dialup not working with KDE, (Mepis) using kpppd?
If your prompt says “The pppd daemon died unexpectedly!”
I solved it by going to /etc/ppp/peers/kppp options.txt and replacing #noauth with noauth (ie Delete the #) and all is now good. Hope this helps others
If you still cannot connect, you can try these:
1) open etc/ppp/peers/kppp-options and remove the # in front
of noauth if it is there.
2) open etc/ppp/pap-secrets and make sure your isp username
and password are there, again with no # in front of the line.
3) open etc/ppp/peers/provider and first make sure the correct
modem is listed, mine is on com port 2 so my line reads
/dev/ttyS1. Then this is the biggie because this line was very
wrong on mine. The chat script line should read :
connect “/usr/sbin/chat -v -f /etc/ppp/peers/provider”
That should do it.
By the way when putting settings in kppp (click configure button)
i used PAP and CR/LF and CRTSCTS and 115200 and /dev/ttyS1(which in
my case is com port 2).
Also do not use lock and if you really have to, change everything logged in as root.
My Windows Tips »« Firefox Tips