Archive for April 24th, 2013

Problems installing Authen::Libwrap on Ubuntu Server using webmin

So going to webmin > Perl Modules > Suggested Modules shows Authen::Libwrap as a suggested module, but using webmin to install it always fails.

Error: Function definition too short '/ * EOF * /' in Libwrap.xs, line 32

the following may help

apt-get install build-essential gcc libc6-dev libwrap0 libwrap0-dev
sudo cpan ExtUtils::MakeMaker
sudo cpan Authen::Libwrap

This was writted for Ubuntu Server 12.04.

Futher Reading:


, , ,

Leave a comment

Simple outbound email configuration for Ubuntu Server 12.04 using sSMTP

If all you really want from your Ubuntu Server is to be able to send you email if something goes wrong, or the occasional email to a trusted partner, friend, colleague, etc, then you want a simple solution. Although Postfix or sendmail, etc, will work in a satellite configuration, it’s still too heavy and over-the-top for this type of setup.

Enter sSMTP.

apt-get install ssmtp

Now open /etc/ssmtp/ssmtp.conf in your favorite text editor and, to get it working on an example gmail account, set it up like so:

Save the file, and you’re done.

Example for Amazon SES users. Be sure the sending domain is verified or mail will get rejected.:
# from SES SMTP settings

Important: You’re leaving your Gmail account password in a plaintext file. Make sure you’re using strong passwords. Even better, use Google 2-factor authentication so you can use an application-specific password for sSMTP.

UPDATE: Lastly, update the permissions

chown root:mail /etc/ssmtp/ssmtp.conf
chmod 640 /etc/ssmtp/ssmtp.conf

Unprivileged users who have a need to send mail using sendmail must be a member of the mail group, or they will receive the following error:

mail: Cannot open mailhub:25

This was written for Ubuntu Server 12.04 64-bit.

Further reading:

, , , , ,

Leave a comment

Suhosin PHP extension on Ubuntu Server 12.04

On Ubuntu Server 12.04:

sudo apt-get install php5-suhosin

Edit /etc/php5/apache2/php.ini and add (this step may not be necessary):



service apache2 restart


Leave a comment

Installing UPS monitoring for a USB UPS on Ubuntu Server

This is for Ubuntu Server 12.04 64-bit.

Install the NUT software

sudo apt-get install nut

edit file /etc/nut/ups.conf

Scroll down to the example, uncommenting and configuring. Locate the correct driver to use from this page. (Most USB UPSes using the usbhid-ups driver, and port set to auto). Example:

driver = usbhid-ups
port = auto

Note the tag used in the brackets, you will need this later.

edit file /etc/nut/upsd.users

Find the section entitled “Configuring for upsmon”, uncomment and configure, using the example given.

Next edit upsmon.conf and add the example MONITOR line provided in upsd.users, adjusted for your settings.

Lastly, edit nut.conf and set appropriately.

now, restart

service nut restart

If you get this error:

* Restarting Network UPS Tools [ OK ]
Broadcast Message from nut@userver
 (somewhere) at 21:52 ...
Communications with UPS myups@localhost lost
Broadcast Message from nut@userver
 (somewhere) at 21:52 ...
UPS myups@localhost is unavailable

Run the following commands as root:

udevadm control --reload-rule
udevadm trigger
upsdrvctl start

That’s it.

, , ,

Leave a comment