slackware

Slackware is a Linux distribution “designed with the twin goals of ease of use and stability as top priorities”.
www.slackware.com

Slackware 11.0 is now available for download. It remains a product that is free for all to use. However, you can help support Slackware and the effort that goes into it by ordering your set of CDs from The Slackware Store.

Articles

My workstation OS: Slackware

“Once I tried the full distro, I never looked back.” Michael Stibane explains why he is happy using Slackware.
www.newsforge.com

Slackware 10: First Impressions

“Above all, I am impressed by Slackware’s stability, clean layout, easy customisation, and excellent package management system.” Michael Hall gives his opinion on Slackware.
www.osnews.com

Slackware 10.1 Review

Matthew Trow shares his sense of excitement about the release of Slackware 10.1 and tells why Slackware remains his preferred Linux flavour.
www.osnews.com

A Brief Look at Slackware 11.0

“Slackware is one of the oldest Linux distributions out there. And over the years, it has consistently kept pace with the changes.”
linuxhelp.blogspot.com

An Old Hacker Slaps Up Slackware

“Slackware is not for everyone. But it is a distribution that nearly everyone should try some day, for several reasons.” Joe Barr has used many different Linux distributions over the years. Until recently, he has never tried Slackware.
www.linux.com

Slackware Essentials

Slackware-Security

Consider subscribing to the Slackware-security mailing list.
www.slackware.com

Slapt-Get

slapt-get is an APT like system for Slackware package management.”
software.jaos.org

Package Browser

Access detailed information on packages included in the Slackware distribution.
slackware.it

Setup

Notes on installing and configuring Slackware Linux 10.2.

Connecting to a Wireless Network

Install the package wireless-tools-27-i486-2.tgz from software set n.

Run netconfig and configure the basic settings for your network.

Run iwconfig and note down the interface on which your wireless NIC is to be found.

Run ifconfig and note down the corresponding MAC address exactly as listed under HWaddr.

If at this point ifconfig does not list the details for your wireless NIC, run ifconfig ethX up followed by ifconfig. You should now have your MAC address.

Edit /etc/rc.d/rc.wireless.conf by replacing the section:

## --------- START SECTION TO REMOVE -----------
## Pick up any Access Point, should work on most 802.11 cards
  *)
  INFO="Any ESSID"
  ESSID="any"
  ;;
## ---------- END SECTION TO REMOVE ------------

with the settings specific to your wireless card and network:

# Harris Semiconductor Prism 2.5 Wavelan chipset (rev 01)
0A:05:5Y:51:A0:9B)
  INFO="Netgear MA311"
  ESSID="WIRELESS"
  MODE="Managed"
  CHANNEL="7"
  RATE="auto"
  KEY="9427b5238ff2fzggfa78e1b0c6"
  ;;

Note that in this example 0A:05:5Y:51:A0:9B is the MAC address of the wireless NIC to be configured (all in uppercase letters).

Edit /etc/rc.d/rc.inet1.conf as required. For example, you might want to set USE_DHCP[eth]="yes" for the interface that you are configuring. Now restart the rc.inet1 script with:

darkstar:~# /etc/rc.d/rc.inet1 restart

Check for the availability of your network. For more information about possible options and parameters look at the generic example given at the end of /etc/rc.d/rc.wireless.conf.

Using the Host AP Driver

If you have got a wireless NIC that uses the Prism2/2.5/3 chipset and would like to use the Host AP driver, follow these simple steps:

Begin by setting up your wireless NIC using the Orinoco driver that is included with Slackware as standard (see above).

Continue by downlading the latest version of the Host AP driver and extracting the archive file:

darkstar:~# lftp -c "get http://hostap.epitest.fi/
releases/hostap-driver-0.4.7.tar.gz"
darkstar:~# tar -zxvf hostap-driver-0.4.7.tar.gz

Change the active directory with cd hostap-driver-0.4.7. Compile the modules with make. Become root and install the modules with make install.

Edit /etc/rc.d/rc.inet1.conf by uncommenting the required lines and entering the values specific to your wireless network:

IFNAME[4]="wlan0"
IPADDR[4]="192.168.0.10"
NETMASK[4]="255.255.255.0"

WLAN_ESSID[4]="WIRELESS"
WLAN_MODE="Managed"
#WLAN_RATE[4]="54M auto"
#WLAN_CHANNEL[4]="auto"
WLAN_KEY[4]="9427b5238ff2fzggfa78e1b0c6"

Remove the settings for your previous wireless interface from /etc/rc.d/rc.inet1.conf before restarting your computer.
groups-beta.google.com, www.linuxquestions.org

Time Synchronisation with NTP

Install the package ntp-4.2.0-i486-1.tgz from software set n.

Add the following to /etc/rc.d/rc.local:

# Start the NTP daemon:
if [ -x /usr/sbin/ntpd ]; then
  echo "Starting NTP daemon: /usr/sbin/ntpd"
  /usr/sbin/ntpd
fi

Download the file ntp.conf, preconfigured with a list of public access time servers, and replace the existing file /etc/ntp.conf:

darkstar:~# lftp -c "get http://www.edafe.org/slackware/conf/ntp.conf"
darkstar:~# mv ntp.conf /etc/

If you are using DHCP to configure your NIC, also add the line DHCP_KEEPNTP[n]="yes" to the configuration information for ethn in /etc/rc.d/rc.inet1.conf. Otherwise, dhcpcd will continue to overwrite ntp.conf at boot:

# Config information for ethn:
IPADDR[n]=""
NETMASK[n]=""
USE_DHCP[n]="yes"
DHCP_HOSTNAME[n]=""
DHCP_KEEPNTP[n]="yes"

Manually synchronise your system clock by issuing the command ntpdate ntp1.nl.net (of course you can use any other time server that is available to you).

Now restart the rc.inet2 script with:

darkstar:~# /etc/rc.d/rc.inet2 restart

After about one minute, issue the command ntpq -p to check that your time synchronisation is working.
www.ntp.org

Public Key Authentication with SSH

SSH is “a tool for secure remote login over insecure networks” and supports the use of public/private key pairs for user authentication. Private keys are kept locally, while public keys are stored on the remote system(s):

On the local machine, use the command ssh–keygen -t dsa to generate a key pair for the local user. Use an appropriate passphrase to secure your private key (don’t be tempted to use an empty passphrase). For the private key file, set the permissions with chmod 600 ~/.ssh/id_dsa .

Copy the public key file ~/.ssh/id_dsa.pub to the remote machine and append it to ~/.ssh/authorized_keys . If the file authorized_keys does not exist, you can simply copy id_dsa.pub and rename it. Set the permissions for the file with chmod 600 ~/.ssh/authorized_keys . Access to the remote machine from now on is tied to your private key and the passphrase used to encrypt it.

The file /etc/ssh/sshd_config contains the configuration data for the ssh daemon running on the remote machine. Setting the following options will make direct root logins impossible. Only users who belong to the group ssh may establish a connection using public key authentication:

Protocol 2

LogLevel VERBOSE

# Authentication:
AllowGroups ssh
LoginGraceTime 60
PermitRootLogin no
#StrictModes yes
MaxAuthTries 1

RSAAuthentication no

# To disable tunneled clear text passwords
PasswordAuthentication no

# Change to no to disable s/key passwords
ChallengeResponseAuthentication no

Compression yes

Let me recommend the book SSH The Secure Shell to you. It is a good reference text and offers information on other clever stuff you can do with SSH.
groups.google.com, www.ibm.com/developerworks/linux/, groups.google.com

Host-Based Firewall Allowing Only SSH Connections

Create the file /etc/rc.d/rc.firewall with the following contents, replacing ethn with the name of the interface you wish to protect:

#!/bin/sh
#
# /etc/rc.d/rc.firewall
#
# Allow only one attempt every 15 seconds at connecting to ethn on port 22:
iptables -A INPUT -p tcp -i ethn -m state --state NEW --dport 22 -m recent --update --seconds 15 -j DROP
iptables -A INPUT -p tcp -i ethn -m state --state NEW,ESTABLISHED --dport 22 -m recent --set -j ACCEPT

# Disallow all other attempts at connecting to ethn:
iptables -A INPUT -p tcp -i ethn -m state --state NEW -j DROP

Set the permissions of rc.firewall to 755 and restart.
slackworld.berlios.de

Sound on ThinkPad x30 (Intel AC 97 Audio Controller)

Apparently hotplug is interfering by automatically loading the snd-intel8x0m module when really it shouldn’t.

To prevent this from happening, simply add snd-intel8x0m to /etc/hotplug/blacklist.

Restart and configure your sound system with alsaconf.

Run alsamixer to adjust the volume and store your settings with the command alsactl store.
groups.google.com, www.alsa-project.org

After installation of a new kernel, reinstall the alsa packages from software set l.

Creating a Software RAID-1 Array

You need two partitions of identical size on two separate drives which are not connected to the same IDE-bus. Use cfdisk to create these partitions and set their type to FD.

Create the file /etc/raidtab and make the following entries:

# RAID-1 Array
raiddev /dev/md0
  raid-level 1
  nr-raid-disks 2
  persistent-superblock 1
  chunk-size 4
  device /dev/hdb1
  raid-disk 0
  device /dev/hdc1
  raid-disk 1

In the next step mkraid will refuse to cooperate unless you define the chunk-size (that is why I have added it to /etc/raidtab, even though it shouldn’t matter in the specific case of a RAID-1 array).

Run mkraid /dev/md0 to create the device /dev/md0.

Create an ext3 filesystem on your RAID-1 array by issuing the command mke2fs -j /dev/md0.

Create the directory /raid as a mount point and add the following line to /etc/fstab:

/dev/md0 /raid ext3 defaults 1 2

Mount your RAID-1 array with mount /raid and check its status with lsraid -a /dev/md0.
slacksite.com

Default Runlevel

Edit /etc/inittab to set the default runlevel for your installation:

# These are the default runlevels in Slackware:
# 0 = halt
# 1 = single user mode
# 2 = unused (but configured the same as runlevel 3)
# 3 = multiuser mode (default Slackware runlevel)
# 4 = X11 with KDM/GDM/XDM (session managers)
# 5 = unused (but configured the same as runlevel 3)
# 6 = reboot

# Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:

Powering Down

If you would like your computer to power down automatically after halting Slackware, uncomment the line /sbin/modprobe apm in /etc/rc.d/rc.modules and restart:

#### APM support ###
# APM is a BIOS specification for saving power using several different
# techniques. This is mostly useful for battery powered laptops.
/sbin/modprobe apm

FireWire and 2.4 Kernel

If you would like to use a FireWire (IEEE 1394) hard disk with the 2.4 kernel, get the rescan-scsi-bus.sh script along with instructions from the IEEE 1394 for Linux site.
www.linux1394.org

Setting Pico as the Default Editor

Set pico as your default editor by adding the following lines to /etc/profile:

export VISUAL="/usr/bin/pico -w"

www.userlocal.com

Mouse Wheel Support

Edit /etc/X11/xorg.conf and add values for buttons and z-axis mapping like in this example:

# Identifier and driver
  Identifier "Mouse1"
  Driver "mouse"
  Option "Protocol" "IMPS/2"
  Option "Device" "/dev/mouse"
  Option "Buttons" "5"
  Option "ZAxisMapping" "4 5"

Documentation

Slackware Linux Basics

Daniël de Kok aims this up-to-date introduction to Slackware Linux 10.2 at “people who have little or no GNU/Linux experience”. An excellent resource for those who are new to Slackware Linux.
www.slackbasics.org

SlackTips

Mikhail Zotov illustrates how aliases and functions can help to speed up many everyday operations in bash.
slackworld.berlios.de

The Stealth Desktop

“There is one distribution you would seldom hear about and yet, it is uniquely qualified for heavy-duty desktop usage”. Eduardo Sánchez in a three part article on how to setup Slackware.
www.ofb.biz Part 1, Part 2 Part 3

Slackware Linux 101

Joe Brockmeier explains how Slackware initialises services, what the various runlevels are and how to add or remove services from the default install.
www.ibm.com/developerworks/linux/

Slackware 10.2 Tips

“Writing a tips article is tricky. Veteran users want incredibly good tips. New users want tips that bring accessibility and understanding to Slackware. Find that balance here.”
www.dualisanoob.com

Revised Slackware Book Project

Revised version of the Slackware Linux Essentials book available for reading online.
www.slackbook.org

Help

Slackware Forum

A forum dedicated to all things Slackware. If you have got a question related to Slackware, this is a good place to ask.
www.linuxquestions.org