Computer Scientist, Graduate Student, and Geek

Tag: ubuntu

Fix X11 Forwarding over SSH in Ubuntu 10.04 (Lucid)

October 13, 2011

There is a bug in Ubuntu Lucid’s sshd (SSH server) that causes issues with IPv6-enabled network interfaces preventing X11 forwarding over SSH from working properly. The error in /var/log/auth.log is:

error: Failed to allocate internet-domain X11 display socket.

To fix the issue, you need to tell sshd to only listen to IPv4. Add the following line at the top of /etc/ssh/sshd_config (before the Port configuration):

AddressFamily inet

Solution is from: http://www.se.cuhk.edu.hk/~hmleung/wordpress/?p=876

Categories: Linux, Networking

Tags: ssh, ubuntu


Persistent Iptables in Ubuntu

September 09, 2011

Fedora defaults to persisting iptables (the Linux firewall) between restarts, but this is not the default case in Ubuntu. To have iptables persist between reboots in Ubuntu, you can install the iptables-persistent package:

sudo apt-get install iptables-persistent
The persistent tables will be stored in /etc/iptables/rules by default. You can save the live iptables to the persistent file using:
sudo iptables-save< /etc/iptables/rules

Solution is from https://help.ubuntu.com/community/IptablesHowTo#Configuration_on_startup

Categories: Linux, Networking

Tags: iptables, ubuntu


Fixing Gnome Themes in Ubuntu 11.04 (Natty)

May 17, 2011

A laptop that was dist upgraded from 10.11 to 11.04 was not applying the correct Gnome themes. Changing the theme in Appearances did not fix the issue. The solution was to uninstall the gnome-accessibility-themes package and install the gnome-themes-standard package. This can be done with the commands:

sudo apt-get purge gnome-accessibility-themes
sudo apt-get install gnome-themes-standard

This blog posted is based on a forum post at: http://ubuntuforums.org/showthread.php?t=1725221&page=2

Categories: Linux

Tags: gnome, ubuntu


Install SNMP on Ubuntu

May 06, 2011

To install SNMP on Ubuntu, run the commands below (as root):

apt-get install -y snmpd

CONFIG="/etc/snmp/snmpd.conf"
mv $CONFIG $CONFIG.bak
echo rocommunity  public > $CONFIG
echo syslocation  "put location here" >> $CONFIG
echo syscontact   youremail@yourdomain.com >> $CONFIG

CONFIG="/etc/default/snmpd"
mv $CONFIG $CONFIG.bak
cat $CONFIG.bak | grep -v SNMPDOPTS > $CONFIG
echo "SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid \
        -c /etc/snmp/snmpd.conf'" >> $CONFIG

service snmpd restart

echo "Installed snmpd"

If you have a firewall, you will also need to allow UDP traffic on port 161. If you use iptables this can be accomplished with

iptables -A INPUT -p udp -m state --state NEW -m udp --dport 161 -j ACCEPT

You can test if SNMP is working by running snmpwalk from another machine:

snmpwalk -v 1 -c public -O e hostname

This blog posted is based on documentation at http://www.it-slav.net/blogs/2009/02/05/install-and-configure-snmp-on-ubuntu.

Categories: Linux, Networking

Tags: snmp, ubuntu


Ubuntu 11.04 (Natty) Automated Network Installation

May 05, 2011

Many sources exist to help with setting up automated network installations of Ubuntu. Below are a list of sources I used to get automated network installations of Ubuntu 11.04 (Natty Narhwal) working.

Categories: Linux

Tags: pxe, ubuntu


Determine Ubuntu Version

February 23, 2011

On Fedora and RHEL systems, uname -a will provide both the Linux kernel version and the version of Fedora/RHEL that is installed. On Ubuntu, uname -a only provides the Linux kernel version. To determine which version of Ubuntu is installed look at the /etc/issue file.

The solution to this issue originally came from an Ubuntu forum post.

Categories: Linux

Tags: ubuntu


Permanently Change Hostname in Ubuntu

February 15, 2011

To permanently to change the hostname of an Ubuntu box, edit the file /etc/hostname. (You need to be root to change this file.) Modify the single line the file contains.

Categories: Linux, Networking

Tags: hostname, ubuntu


sshd in Ubuntu

December 28, 2010

By default, Ubuntu does not have sshd installed and configured. To be able to ssh into your machine, run:

sudo apt-get install openssh-server

Categories: Linux

Tags: apt, ssh, ubuntu


Eeebuntu on ASUS EeePC 1000HA Missing Network Adapters

May 24, 2010

A few weeks ago I helped a friend install Eeebuntu 3 on his ASUS EeePC 1000HA. After installation, no network adapters were being recognized--neither wired or wireless.

The solution was to upgrade to the 2.6.30 Linux kernel, which adds the necessary support for the network hardware in the EeePC 1000HA. The necessary Debian packages can be downloaded from the Ubuntu kernel mirror to a flash drive using a different computer. Then, install the three necessary Debian packages on the EeePC in this order:

  1. linux-headers-2.6.30-020630_2.6.30-020630_all.deb
  2. linux-image-2.6.30-020630-generic_2.6.30-020630_i386.deb
  3. linux-headers-2.6.30-020630-generic_2.6.30-020630_i386.deb
After you install all three packages in Eeebuntu, reboot the EeePC. Linux should recognize both the wired and wireless network adapters. Eeebuntu will try to get you to upgrade to the Linux 2.6.27 kernel via apt, but be sure NOT to install the kernel updates otherwise you'll be right back where you started.

The solution to this issue originally came from an Eeebuntu forum post.

Categories: Linux, Networking

Tags: eeebuntu, eeepc, ubuntu


Finding Packages in Ubuntu

September 29, 2009

In Fedora, I always use yum search to determine the exact name of a package I want to install using yum install. However, in Ubuntu I noticed apt-get does not have any search function. Instead, I needed to use apt-cache search to locate the exact name of a package. Also, it is good practice to run apt-get update prior to using apt-cache search to ensure the latest list of packages is cached on your computer.

(Note that apt-get update is not the same as yum update. apt-get update updates the list of packages, while yum update updates the list of packages and installs the newest version of any updated packages. In Ubuntu, apt-get upgrade will install the newest version of any updated packages.)

Categories: Linux

Tags: apt, fedora, ubuntu, yum