Redirect root mail to external address in Debian
To redirect root mail to an external email just use /etc/aliases
# vi /etc/aliases
root: youremail@email.com
# newaliases
To redirect root mail to an external email just use /etc/aliases
# vi /etc/aliases
root: youremail@email.com
# newaliases
I recently had a problem with my development machine. I haven’t used it in a while and realized I could not VNC or SSH to the box. This is a headless machine so I had to plugin a monitor and keyboard to see what was happening. I was greeted with the following:
Target file system doesn’t have /sbin/init
No init found. Try passing init= bootargBusybox v1.13.3 (Ubuntu 1:1.13.3-1ubuntu7) built-in shell (ash)
Enter ‘help’ for a list of built-in commands
(initramfs) _
Not very happy about this. Running “help” didn’t reveal any tools that would repair the boot volume. To recover I booted to an Ubuntu 10.10 CD and select the option to “Try Ubuntu”. Once this started I used Ctrl + Alt + F1 to get to a shell and ran the following:
sudo fdisk -l sudo fsck /dev/sda1
Running fdisk -l was just to be sure of the naming convention for my main drive, which in this case was /dev/sda1. I had to enter yes a couple times and then rebooted the machine which loaded successfully.
Capabilities on OpenVZ causes pure-ftpd not to start when installing with the package manager. Use the following method to download the source and build pure-ftpd without capabilities.
mkdir /usr/src/pure-ftpd cd /usr/src/pure-ftpd apt-get source pure-ftpd apt-get build-dep pure-ftpd
Edit the rules file and add the following to optflags [--without-capabilities]
cd pure-ftpd-1.0.21/debian vi rules
optflags=–with-everything –with-largefile –with-pam –with-privsep –with-tls –without-capabilities
Build the package and install it.
cd .. dpkg-buildpackage -uc -b cd .. dpkg -i pure-ftpd-common_1.0.21-11.4_all.deb pure-ftpd-mysql_1.0.21-11.4_i386.deb /etc/init.d/pure-ftpd-mysql restart
Prevent the package manager from trying to update pure-ftpd
echo 'pure-ftpd-common hold' | dpkg --set-selections echo 'pure-ftpd-mysql hold' | dpkg --set-selections
On a new VPS I was getting the following error when running apt-get update
GPG error: http://security.debian.org lenny/updates Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B
To resolve this, install the following package:
aptitude install debian-archive-keyring aptitude update aptitude dist-upgrade