Auto-connect to hidden wireless without elevating privilege

When I boot my laptop into Ubuntu 10.10, the wireless won't automatically connect; it is configured, and I can get a connection using "Connect to Hidden Wireless Network..." and selecting the name from the drop-down - however, the first time (per boot) I do this, it asks me to elevate myself. The connection works if I then surrender the elevated privilege. The connection is set as available to all users, and to connect automatically.

What I would like is that it silently and automatically connect to the wireless. How can I do that?

3

3 Answers

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:

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

7

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).

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like