3

Running Arch/Linux with everything up-to-date and I use network manager's built-in hotspot function to share my Internet.

I'm trying to edit the configuration (mostly the password, as I don't like the random password) for the "hotspot" connection. I've worked on both the network settings GUI and the config file under /etc/NetworkManager/system-connections. Somehow network manager doesn't like this configuration being edited. Every time I change anything and start hotspot again, the edited one will be abandoned, and NM will create a new hotspot connection with default settings and a new random password. How do I tell NM to accept what I've edited?

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
Mr.Koala
  • 31
  • 1
  • 1
  • 3

4 Answers4

2

I've had success editing the essid and psk fields in /etc/NetworkManager/system-connections/Hotspot and then restarting NetworkManager with sudo service network-manager restart so that it reads in the new settings.

It seems that as long as this file is still called Hotspot, it will be the configuration used when you start a hotspot from System Settings -> Networking.

NOTE: I've most recently tried this on LMDE, but hopefully it will apply to Arch.

pix
  • 141
  • 3
1

I wasn't able to get the graphical tools to respect the ssid change, I was able to find a way to setup a wifi access point directly like so:

nmcli dev wifi hotspot ifname wlp4s0 ssid test password "test1234"

credit: https://unix.stackexchange.com/a/384513/61349

ThorSummoner
  • 4,312
  • 6
  • 30
  • 47
1

The hotspot configuration for Network manager can be edited from the file plasma-nm located in /home/~/.config/

[General]
AirplaneModeEnabled=false
HotspotConnectionPath=/org/freedesktop/NetworkManager/ActiveConnection/3
HotspotName=Y4
HotspotPassword=
ManageVirtualConnections=true
UnlockModemOnDetection=true
Carlos
  • 11
  • 3
0

If you mean you have activated hostapd, then the password is in /etc/hostapd/hostapd.conf.

MariusMatutiae
  • 4,363
  • 1
  • 23
  • 36
  • I'm not running hostapd. The authentication is handled by NM using something. Actually NM and hostapd can get in conflict. If I stop NM from managing WLAN and use hostpd it works well. But using NM's built-in AP is just more convenient. – Mr.Koala Jun 09 '14 at 09:35
  • NM uses the tool [wpa_supplicant](https://en.wikipedia.org/wiki/Wpa_supplicant) and is passing settings to it at runtime through a Unix domain socket. – szmoore Mar 01 '21 at 06:34
  • And investigating wpa_supplicant further, it seems to either be forked from or copying parts of hostapd. It has [hostapd.h](https://github.com/digsrc/wpa_supplicant/blob/515eb37dd1df3f4a05fc2a31c265db6358301988/src/ap/hostapd.h). You're right it's a different binary and uses different config files and may conflict, but they do not seem so different... – szmoore Mar 01 '21 at 07:07