6

Is there a way to create a hotspot that doesn't have a password?

The "hotspot command" of nmcli :

 wifi hotspot [ifname ifname] [con-name name] [ssid SSID]
       [band {a | bg}] [channel channel] [password password]

does not allow to have a empty password: it gives

Error: Invalid 'password': '' is not valid WPA PSK.

I guess there is a way to edit the configuration files used by nmcli to generate a hotspot to turn it into a password-free hotspot.

If nmcli is not able to do this, what other tools would do it?

Thank you

6

It is not possible to create an open hotspot through wifi hotspot command , because nmcli will generate a password for you (WPA or wep) , the --show-secrets option will be used to print the password.

The easy way to create an open wifi-hotspot is using create_ap command:

To install it run:

git clone https://github.com/oblique/create_ap
cd create_ap
make install

Start the service:

systemctl start create_ap

To create an open access point run:

create_ap wlan0 eth0 MyAccessPoint

or if you are connected through Wifi:

create_ap wlan0 wlan0 MyAccessPoint
1

nmcli device wifi hotspot is merely a convenience function for creating and activating a hotspot profile. Indeed, that does not support open hotspots.

However, you can just create a suitable connection profile via other means: like nm-connection-editor or nmcli connection add type wifi con-name "My Hotspot" autoconnect no wifi.mode ap wifi.ssid "My Hotspot" ipv4.method shared ipv6.method shared.

Of course, you can also modify an existing profile from having security to having no security. For example, with nmcli connection modify "$PROFILE" remove wifi-sec remove 802-1x

1

Yes, you can create an open wifi network access point without implementing security protocols using nmcli and NetworkManager. Use the following command

nmcli connection add \
     type wifi \
     con-name "My Hotspot" \
     autoconnect no \
     wifi.mode ap \
     wifi.ssid "My Hotspot" \
     ipv4.method shared \
     ipv6.method shared

Note the non-inclusion of the password parameter when creating the connection. Inclusion of the parameter when the connection is built creates a distinctly different connection profile which includes the 802-11-wireless-security section which forces WPA or WEP. Once a profile is formed, I don't believe it can be changed, so if you may need two profiles if you want to switch between secure and insecure.

Along these same lines, folks are trying to bridge wifi to ethernet. AFAIK you cannot change a wifi connection profile after it is created to include the bridge as it won't contain that section, so to create an open wifi bridged access point include the "master" parameter.

nmcli connection add \
     type wifi \
     master br0 \
     con-name "My Hotspot" \
     autoconnect no \
     wifi.mode ap \
     wifi.ssid "My Hotspot"

After bridging wifi you may have difficulties with the wpa_supplication and may need to specify the bridge interface on the command line, systemd, or arguments file. For CentOS8 this was in /etc/sysconfig/wpa_supplicant

--INTERFACES=""
++INTERFACES="-i wlp2s0 -b br0"

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.