# hostapd.wpa_psk not working



## attley (Mar 6, 2011)

Hi, 

I have configured my FreeBSD machine to act as a wireless AP. All works well, but when I try to define two different passwords for wireless client authentication with "hostapd.wpa_psk", the authentication doesn't work. The main idea is to have one password for my own wlan devices and one password to share with my friends when they visit me and want to use wifi. With this configuration, it would be easy to change the shared password whenever I want to. I have understood that it's possible to do this with hostapd.wpa_psk. However I can't figure out how to make this work. 

This is my /etc/hostapd.wpa_psk conf:


```
# List of WPA PSKs. Each line, except for empty lines and lines starting
# with #, must contain a MAC address and PSK separated with a space.
# Special MAC address 00:00:00:00:00:00 can be used to configure PSKs that
# anyone can use. PSK can be configured as an ASCII passphrase of 8..63
# characters or as a 256-bit hex PSK (64 hex digits).

###public
00:00:00:00:00:00 sharedpasswordphrase

###privates
#laptop
XX:XX:XX:XX:XX:XX privatepasswordphrase
#ps3
YY:YY:YY:YY:YY:YY privatepasswordphrase
```

This is my /etc/hostapd.conf:


```
interface=wlan0
debug=1
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
ssid=bsdwlan
wpa=2
#wpa_passphrase=password
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP TKIP
wpa_psk_file=/etc/hostapd.wpa_psk
```


----------

