WPA passkeys don’t like ‘&’

I’ve been attempting to get Suse 10 working with my wireless network again after I upgraded the network security to WPA-PSK (TKIP).


  • Wireless network being detected in KInternet as a WEP network.
  • KInternet doesn’t appear to support WPA.
  • Unable to authenticate with Wireless network using WPA-PSK.

Most Importantly:

  • Ampersands in the WIRELESS_WPA_PSK setting of wireless interfaces config file (/etc/sysconfig/network/ifcfg-wlan-yourNICsMacAddy) can not have an ‘&’ character in them. Characters after the ‘&’ will be ignored.


  • Configure your wireless interface in YAST such that it refers to the WPA-PSK network you are directly connecting to. For example, specify the SSID of the access point rather than ‘any’.
  • Disable KInternet from launching on KDE login.
  • Cleanup the wireless interfaces config file (/etc/sysconfig/network/ifcfg-wlan-yourNICsMacAddy), remove WEP passwords from the previous configuration.
  • Set USERCONTROLsetting to ‘no’. Disabling KInternet from launching at logon in Yast previously should have set this automatically.
  • In WIRELESS_WPA_PSK setting, precede the ampersand with the ‘‘ escape character.
  • Use hwdown / hwup to restart the interface.
  • Do an ifstatus interfaceName to ensure that the reconnection is successful.

Troubleshooting steps

  1. Read documentation for the hw{up, down, status} commands & ifcfg-wireless configuration file.
  2. Learnt that the paramater to use with hw… commands are the filenames found in /etc/sysconfig/hardware/hwcfg-*
  3. Opened a command shell, sudo as root user.
  4. Took down the device with /sbin/hwdown hwcfg-bus-pci-00:02:0a.0 (enter this command while your in the /etc/sysconfig/hardware directory so you can get tab completion to fill in the hwcfg name including escape sequences.
  5. Did a hwup (essentially this and the previous step give me a clean slate)
  6. Did an ifup-dhcp eth1
  7. Got the following

icarus-lx:/etc/sysconfig/hardware # /sbin/ifup eth1
eth1 device: Intel Corporation PRO/Wireless LAN 2100 3B Mini PCI Adapter (rev 04)
eth1 configuration: wlan-id-your:wNICs:MAC:addy
scripts/ifup-wireless: line 515: 2: command not found
eth1 starting wpa_supplicant
Line 7: Invalid passphrase length 7 (expected: 8..63) charsUp‘.
Line 7: failed to parse psk ‘”charsUp‘.
Line 8: WPA-PSK accepted for key management, but no PSK configured.
Line 8: failed to parse network block.
Failed to read configuration file ‘/var/run/wpa_supplicant-eth1.conf’.
DHCP client is already running on eth1
ERROR: Warning: Could not set up default route via interface
Command ip route replace to default via returned:
. RTNETLINK answers: Network is unreachable
Configuration line: default – –
This needs NOT to be AN ERROR if you set up multiple interfaces.
See man 5 routes how to avoid this warning.

I’ve modified the output for security reasons, but just pretend in this case my WPA passkey is charsUp&BeyondTheAmpersand. The error message (Line 7:…) is telling me that the password is too short, rather that its not reading past the ampersand sign.

  1. Modified the /etc/sysconfig/network/ifcfg-wlan-00:00:00:00 with the correct password
  2. Bought down the interface with ifdown.
  3. Bought down the hardware device with hwdown
  4. Bought up the hardware device with hwup, which automatically does an ifup on the connected interface
  5. Do a ifstatus to verify that you are now connected to the network. The last few lines should look similiar to
  6. bssid=ap’s:mac:address
    Supplicant PAE state=AUTHENTICATED
    EAP state=SUCCESS

Useful Commands
/usr/sbin/hwinfo – displays a list of hardware devices and the parent devices to which they are joined

Its worth noting I managed to get by with just the simple hwup, down, status & ifup-dhcp, ifdown, ifdown-dhcp and ifstatus commands to resolve the problem. /usr/sbin/iwconfig was not required.

Useful Files and Directories
/etc/sysconfig/hardware/hwcfg-…. – The filenames of the hardware config files. Specify this filename when running the hwup/down/status commands
/etc/sysconfig/network/ifcfg-wlan-… – The config files for the wireless interfaces

Leave a Reply