4

Always I log into Ubuntu 15.04 and my wifi network (HP-LASERJET) is in range it wants a password from me, despite I always save it. I have a problem just with this wifi network (it is not a printer, it is a basic AP). The only difference is, that it has a hidden SSID. How to force ubuntu to remember my password? I dont want to type it again and again. Thank you.

annoying popup

When I try to fix it in Network Manager -> Edit connections, I choose my network I save the password on my screen appear different popup window: enter image description here

And I have to type keyring password before I want to connect to my wifi. On different networks I do not have to do this.

wair92
  • 482
  • 2
  • 5
  • 19

4 Answers4

4

edit :

sudo -H gedit /etc/NetworkManager/system-connections/HP-LASERJET

and find the section that says

[802-11-wireless-security]
key-mgmt=wpa-psk

and place the following on the next line.

psk=yourPassword

As a prevention for rewriteing it by system use:

chmod 400 /etc/NetworkManager/system-connections/HP-LASERJET
Zanna
  • 72,312
wair92
  • 482
  • 2
  • 5
  • 19
-1

You need to modify the connection's properties programmatically, with NetworkManager's nmcli utility.

Here are some useful commands (hit TAB for autocompletion at all times):

  • To modify properties of existing connections:

    # sudo nmcli connection modify <connection-id> <parameter> <value>
    

    to set the password:

    sudo nmcli connection modify "HP-LASERJET" 802-11-wireless-security.psk p@$$w0rd

    to disable the network's autoconnection property:

    sudo nmcli connection modify "HP-LASERJET" connection.autoconnect no

  • To list all the properties of a given connection (really much more than what you can get from the contents of a *.nmconnection file or the nm-connection-editor GUI):

    nmcli connection show "HP-LASERJET"
    

    to reveal the hidden values:

    nmcli connection show --show-secrets "HP-LASERJET"

Source: https://linuxhint.com/expertly-use-the-ubuntu-network-manager/

KiriSakow
  • 923
-1

This may or may not apply, but I suspect that if you open your Internet connection icon at the top of the screen and select "edit connections" you might be able to select your printer, press "edit..." and check the box marked "connect automatically". I realize it is probably already checked, but maybe there is a way to make it apply the saved password automatically. It might be a setting under the tab there marked "wireless security".

The reason I suspect it might not apply is that I am using an earlier version of Ubuntu and the configuration of this feature may very well have changed slightly.

gyropyge
  • 2,568
-1

My situation is similar to what eldergeek described, but it has some variation.

sudo -H gedit /etc/NetworkManager/system-connections/HP-LASERJET

Change this:

[wifi-security]
key-mgmt=wpa-psk
psk-flags=1

To this:

[wifi-security]
key-mgmt=wpa-psk
psk=YourPassword
psk-flags=0
Zanna
  • 72,312
Alvin Ho
  • 31
  • 1
  • 1
  • 6