Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Network configuration w/ authentication (Read 2157 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Network configuration w/ authentication

Hi everyone!

I just subscribed to the forum since I recently decided to give minimal Linux distros a try and chose Artix with LARBS by Luke Smith as a starting point. I (seemingly) managed to install everything correctly but I still can't figure out how to configure a wireless network with authentication using Network Manager (I need to connect to mu university network). I am definitely a n00b, so I don't know what information would be helpful to solve this, please ask whatever may be helpful.

Thank you in advance!

Re: Network configuration w/ authentication

Reply #1
EDIT:  by "authentication" I mean those wireless networks you connect to by entering a username and password.

Re: Network configuration w/ authentication

Reply #2
If LARBS is using NetworkManager as you say, it's a matter of typing nmtui at a terminal and following the wizard. It's pretty much a GUI program despite the terminal.

Re: Network configuration w/ authentication

Reply #3
Thank you for your reply @capezotte. I already tried that, but as I try to select and activate the interested network I get:

Could not activate connection: Failed to determine AP security information

As I said, I need to specify a username and password to connect to this specific network. I already managed to connect to other networks (which only require the wifi password), but not this one. I guess there are some things to specify in some config files, but I am a newbie and don't know how to start.


Re: Network configuration w/ authentication

Reply #5
Thank you @strajder! I looked at the link you shared and tried to replicate some instructions but still didn't manage to make things work. I created a wpa_supplicant.conf file in  /etc but sudo_wpa_cli gives me:

 Could not connect to wpa_supplicant: (nil) - re-tring

Did I miss something? Do you have any suggestions?

Re: Network configuration w/ authentication

Reply #6
Read the wiki. The whole page, carefully.

https://wiki.archlinux.org/title/Wpa_supplicant#Connecting_with_wpa_cli
Quote
In order to use wpa_cli, a control interface must be specified for wpa_supplicant, and it must be given the rights to update the configuration. Do this by creating a minimal configuration file:

Re: Network configuration w/ authentication

Reply #7
Sorry for bringing this up after a long time, but I've been trying to connect to eduroam using wpa_supplicant with no success. I followed all the instructions provided in the wiki. Namely:

1) created /etc/wpa_supplicant/wpa_supplicant.conf. After some googling, I found these settings to (apparently) be the right ones for institutional networks such as eduroam:

Code: [Select]
ctrl_interface=/run/wpa_supplicant
ap_scan=1
eapol_version=2
update_config=1

network={
disabled=2
auth_alg=OPEN
ssid="eduroam"
scan_ssid=1
key_mgmt=WPA-EAP
proto=WPA RSN
pairwise=CCMP TKIP
eap=PEAP
identity="[email protected]"
password="mypassword"
phase1="peaplabel1=0"
phase2="auth=MSCHAPV2"
}

(I obviously edited the "identity" and "password" fields).

2) run wpa_supplicant -B -i interface -c /etc/wpa_supplicant/wpa_supplicant.conf

3) sudo dhcpcd wlan0

Which, however, says "waiting for carrier" and then "timed out"

4) sudo wpa_cli

5) enable eduroam

Which (if I got it right) should automatically connect to eduroam. However, all I get is an error (just "FAIL"). I don't know if there is something wrong with my conf file or in the procedure. Also, I'm not quite sure I understood if wpa_supplicant can manage connections all by itself or if it just provides an authentication protocol to be used together with an actual connection manager, i.e. NetworkManager. Sorry for asking such noob-ish question, but I'm still not comfortable configuring many things in Artix and I'm trying my best to learn. Any help for anyone who spots some errors will be highly appreciated, since managing to connect to eduroam is now on top of my priority list. Thanks everyone! :)

Re: Network configuration w/ authentication

Reply #8
https://forum.artixlinux.org/index.php/topic,2986
Perhaps you edited for some reason but -i interface should be -i wlan0 for starters, if that's what you're using. Possibly try connecting to a simple wifi router first, the conf for eduroam looks complex, I wonder if that's all needed, don't know though, never heard of it before.
# iw dev wlan0 scan |grep SSID or something like that might help confirm the correct SSID name.

Re: Network configuration w/ authentication

Reply #9
Since none of my (numerous) attempts with wpa_supplicant was succesful, I've been looking for a different solution. I found this website, which offers the opportunity to download a python script to automatically configure eduroam depending on your institution. I downloaded the one I needed and tried to execute it but it gives me:

import distro
ModuleNotFoundError: No module named 'distro'


Basically there is this distro module missing. Turns out I need to install it using pip, so I first installed python-pip with pacman:

# pacman -S python-pip

and then I tied to install distro with:

python -m pip install distro

which, however, gives me:

/usr/bin/python: No module named pip

Similar commands (pip install distro, pip3 install distro etc...) just give me command not found. Do anyone have some ideas on how to overcome this issue?

Re: Network configuration w/ authentication

Reply #10
Perhaps install one of these for distro, which one depends on the python version of the script:
Code: [Select]
galaxy/python-distro 1.6.0-1 [installed]
galaxy/python2-distro 1.6.0-1
Packages installed with pip rather than pacman can require manual intervention over major python version updates, although it's useful if they aren't in the repos. My pip just tells me
Code: [Select]
$ pip install distro
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: distro in /usr/lib/python3.9/site-packages (1.6.0)

Re: Network configuration w/ authentication

Reply #11
Similar commands (pip install distro, pip3 install distro etc...) just give me command not found. Do anyone have some ideas on how to overcome this issue?
Code: [Select]
$ pacman -Qo $(which pip)
/usr/bin/pip is owned by python-pip 20.3.4-1
$ sudo pacman -S python-pip
Code: [Select]
$ find /usr/lib/python3.9/ -name '*distro*'
/usr/lib/python3.9/site-packages/distro-1.6.0-py3.9.egg-info
/usr/lib/python3.9/site-packages/pip/_vendor/distro.py
/usr/lib/python3.9/site-packages/pip/_vendor/__pycache__/distro.cpython-39.pyc
/usr/lib/python3.9/site-packages/distro.py
/usr/lib/python3.9/site-packages/__pycache__/distro.cpython-39.pyc
/usr/lib/python3.9/site-packages/__pycache__/distro.cpython-39.opt-1.pyc
$ pacman -Qo /usr/lib/python3.9/site-packages/distro-1.6.0-py3.9.egg-info
/usr/lib/python3.9/site-packages/distro-1.6.0-py3.9.egg-info/ is owned by python-distro 1.6.0-1
$ sudo pacman -S python-distro
https://wiki.archlinux.org/title/Pacman

For not installed packages: https://wiki.archlinux.org/title/Pkgfile
Code: [Select]
$ pkgfile -s distro
galaxy/python-distro
community/byobu
community/python-distro
or just pacman:
Code: [Select]
$ pacman -Ss distro
galaxy/python-distro 1.6.0-1 [installed]
    Linux OS platform information API
galaxy/python2-distro 1.6.0-1 [installed]
    Linux OS platform information API
galaxy/rpm-tools 4.17.0-1
    RPM Package Manager - RPM.org fork, used in major RPM distros
community/distrobuilder 2.0-1
    System container image builder for LXC and LXD
community/python-distro 1.6.0-1 [installed]
    Linux OS platform information API
community/python2-distro 1.6.0-1 [installed]
    Linux OS platform information API
community/rpm-tools 4.17.0-1
    RPM Package Manager - RPM.org fork, used in major RPM distros

Re: Network configuration w/ authentication

Reply #12
I think I finally figured it out (maybe the dumb way). Turns out there is (apparently) no need for wpa_supplicant or the eduroam CAT installer, since I seemingly managed to enable eduroam with the use of nm-connection-editor only. I think I will stick to this solution (at least for now), but thanks everyone anyway for your precious help!

 

Re: Network configuration w/ authentication

Reply #13
wpa_supplicant is still used by networkmanager. Using wpa_supplicant directly makes a lightweight reliable solution but is usually harder to configure and add new connections. If it works now that's great  ;D