Security

One-liner to mail when someone logs in as root

This is a short post describing how to automatically send an email every time someone logs in as root on a linux server. Add the following line to /root/.bash_profile if you are using bash as your default shell interpreter. Refer to /etc/passwd. (echo “Subject: ALERT: servername Root Shell Access from `who | awk ‘{print $5}’`”; […]

Read More
Linux

Installing build-essentials in CentOS or Ubuntu

This post desrcibes how to install “build-essentials” on CentOS/RedHat og Ubuntu/Debian. build-essentials provides the packages you need to build or compile source code (make and gcc) and create binary files. The build-essentials package is a quick way to install the packages needed to compile VMware Tools on a VMware guest. In Ubuntu $ sudo aptitude […]

Read More
Virtualization

Mount VMware virtual disk VMDK-file in a physical linux machine

This example has been used on a machine with VMware Workstation 9 installed locally. To mount a VMDK-file you can use the VMware command vmware-mount like this $ sudo vmware-mount /path/to/vmdk/file/name-of-vmdk-file.vmdk 1 /path/to/mount/point In the example above we have mounted partition 1 in the VMDK-file from the disk /path/to/vmdk/file/name-of-vmdk-file.vmdk The files are now accessible from […]

Read More