26 January 2012

KDE 4.8 is released!

Congrats to the KDE team on the 4.8.0 release this week!  I'm looking forward to it being packaged by my distro and it sounds very nice.  I am especially excited that the bulk-rename function in Dolphin now keeps the default extension, which will help my to rename images and video taken with my camera.

Congrats to KDE and to the community!

22 January 2012

Ethernet Bonding in Debian: 2 NICs acting as one

Ethernet Bonding allows two (or more) ethernet cards to act as one, dramatically increasing throughput or allowing for redundancy.  More info about the various modes are available here.

1.  Install ifenslave:
root#  aptitude install ifenslave

2.  Set the 'bonding' module to load at boot:
root# echo bonding >> /etc/modules

3.  Set up your bonding configuration:
root#  vim /etc/modprobe.d/bonding.conf
and put in these lines and save the file:

alias bond0 bonding
options bonding mode=5 miimon=100 downdelay=200 updelay=200

4.  Edit your networking interfaces file
root#  vim /etc/networking/interfaces

comment out the eth0 and eth1 settings, and set up bond0 (and bond1 if you have enough cards to do this), editing this info to match your needs:

iface bond0 inet static
        address 192.168.1.100
        netmask 255.255.255.0
        network 192.168.1.0
        gateway 192.168.1.1
        up /sbin/ifenslave bond0 eth0 eth1
        down /sbin/ifenslave -d bond0 eth0 eth1

5.  If you have more than one bond (say, bond1 with eth2 and eth3) you'll need to set that up in your bootup scripts; edit /etc/init.d/networking and add* these lines (the bold ones) just before the Options are loaded:


#!/bin/sh -e
### BEGIN INIT INFO
# Provides:          networking
# Required-Start:    mountkernfs $local_fs
# Required-Stop:     $local_fs
# Should-Start:      ifupdown
# Should-Stop:       ifupdown
# Default-Start:     S
# Default-Stop:      0 6
# Short-Description: Raise network interfaces.
### END INIT INFO

PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"

[ -x /sbin/ifup ] || exit 0

. /lib/lsb/init-functions

echo +bond1 >> /sys/class/net/bonding_masters
ifup bond1

process_options() {
    [ -e /etc/network/options ] || return 0
    log_warning_msg "/etc/network/options still exists and it will be IGNORED! Read README.Debian of netbase."
}
...
...
...

*  I'm sure that this isn't the best place to add these lines for the bond1 but doing this in rc.local means your network comes up later than you maybe want.  However, if you don't somehow add bond1 to that file, you'll get errors such as:

SIOCSIFADDR: No such device
bond1: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device

21 January 2012

Cygwin SSH server: adding Windows accounts

If your Windows server needs SSH, the Cygwin set of tools does a great job of combining the GNU tools on a Windows platform.  Download and install Cygwin and install the SSH Server; once you have that installed you're going to want your local users to have SSH access.


This pulls Windows accounts and adds the account info to Cygwin:
$ mkpasswd -cl |grep $USERNAME >> /etc/passwd

This sets up Windows groups on Cygwin (they may already be there):
$ mkgroup --local |grep $GROUPNAME >> /etc/group

Note that you may need to edit your /etc/passwd file for a new home directory, default group membership, or other such info that would be contained in the /etc/passwd file.