Archive for the 'tips and tricks' category

Tips and tricks: How do I set default password expiration for new accounts?

To set the default password expiration when creating new accounts on Red Hat® Enterprise Linux®, edit the /etc/login.defs file.

For example, to set the default maximum number of days a password may be used, change the following parameter in login.defs:

PASS_MAX_DAYS 30

To set the default number of days warning given before a password expires, change the following parameter in login.defs:

PASS_WARN_AGE 7

Please refer the man page of login.defs for more parameters about default password expiration. » Read more


Tips and tricks: How do I check the software integrity on Red Hat Enterprise Linux 5?

There is an integrity checking software called AIDE shipped by Red Hat® Enterprise Linux® 5. AIDE provides some general strategy for implementing integrity checking to detect the intrusions when they have occurred. » Read more


Tips and tricks: How do I find information (version, etc.) about php?

To get information about the version of PHP installed on the system, create a php file on the web server called phptest.php with the following code in the file:

<?

phpinfo();

?>

Save the file and open it from a web browser. This will display information about php.


Tips and tricks: How do I resize multiple image files using command-line tools?

Image file size depends on the amount of image details it has. The higher the image quality, the better the resolution but the larger the resulting file size. Web galleries tend to load very slow and sometimes inaccessbile if photos have very high resolutions.

The mogrify command allows users to resize multiple image files at once. mogrify comes with the ImageMagick package. ImageMagick is a program used to resize, rotate, manipulate and display images. It can read, convert and write images in JPEG, TIFF, PNM, GIF and other Photo CD image formats. » Read more


Tips and tricks: How do I capture the output of “top” to a file?

The command top is a very useful tool to capture information about process running on Linux. Many times this information may need to be captured to a file. This can be done with the following command:

top -b -n1 > /tmp/top.txt

This will run top once write the output to a file and exit.

The command top can also be run so that it will give multiple reports. To run top 5 times and wait 5 seconds between each output the command would be:

top -b -n5 -d5 > /tmp/top.txt

Tips and tricks: How do I configure a Linux guest to shutdown from z/VM?

This is accomplished through the combination of the SIGNAL SHUTDOWN command from z/VM and /etc/inittab file in Linux. First, logon to z/VM as MAINT, then run the following command:

==> CP SET SIGNAL SHUTDOWN 180

This instructs z/VM to wait 3 minutes (180 seconds) for each guest to complete shutdown. Increase this value if there are services running that require longer to stop.

» Read more


Tips and tricks: Why does system-config-cluster fail to run in Red Hat Cluster Suite 4 update 6?

Release Found:Red Hat Cluster Suite 4 update 6

In Red Hat Cluster Suite 4 update 6, the running of system-config-cluster will abort with following error messages or similar: » Read more


Tips and tricks: Do all certified systems support full virtualization in Red Hat Enterprise Linux 5?

No, hardware must meet certain requirements to support full virtualization in Red Hat Enterprise Linux 5. For x86_64-based systems, the processor must support Intel VT-x or AMD-V technology. For Itanium2-based systems, the system must use a Montecito (or newer) processor.

In addition to CPU support, the system BIOS must also support full virtualization. Please contact the system vendor to determine if the BIOS supports full virtualization.

(Note that if this Knowledgebase article was linked from a system listing on the Red Hat Hardware Catalog, the system in question does not support full virtualization.) » Read more