Auto-connect to hidden wireless without elevating privilege
Solution 1:
If even after all warnings about using a hidden SSID you still want to use it, this is how you can do it.
Create a script, e.g. ~/bin/nm-connect-me.sh with the follwing contents:
#!/bin/sh
#
# Automatically try to connect to 'MyWiFi' when WiFi is enabled
#
# the output of nmcli should be in English
LC_ALL=C
# loop for a while until NetworkManager is accepting commands
while [ "$(nmcli -t -f WIFI,STATE nm)" = 'enabled:disconnected' ]
do
nmcli con up id MyWiFi
sleep 5
done
exit 0
Then add it to your list of startup applications.
Of course you have to replace MyWiFi by your SSID name.
This information has been extracted from: http://blog.nixpanic.net/2011/01/connect-automatically-and-immediately.html
Solution 2:
I'd recommend not to use hidden network settings, because you'll have nothing but trouble from it (I am telling you this from my own personal experience).
It is not a security feature, in fact, if you google it a bit, you'll discover that your network can actually be less secure with hidden SSID. It may also be the cause you need to elevate..
See http://brighthub.com/computing/smb-security/articles/1211.aspx
Solution 3:
You can set the keystore password to blank, therefore you will not be asked for a password anymore (I mean the keystore password, not your account password, obviously).