Thinstation / thinstation

A framework for making thin and light Linux based images for x86 based machines and thinclients.
https://www.thinstation.net/
799 stars 187 forks source link

Auto connect to Wi-Fi enterprise network #591

Open jeniha opened 4 years ago

jeniha commented 4 years ago

Hi, i have two questions: 1.Can set TS to connect automatically to the enterprise wifi-fi network with PEAP protocol and WPA2-Enterprise?I need to use username and password to connect to our company wireless network. 2.If i can, what i need to do to make it work?

jeniha commented 4 years ago

Is it possible?

Thinstation commented 4 years ago

You will have to write a custom wpa_supplicant.conf file. You can then include it in your build and specifiy CUSTOM_SUPPLICANT_CONF= in .buildtime

jeniha commented 4 years ago

Can you give me, a hint what I need to include in conf. I need to use username, ad, and password to log in wireless. Did i need special packages to enable.

Thinstation commented 4 years ago

ctrl_interface=/run/wpa_supplicant ctrl_interface_group=0 eapol_version=2 ap_scan=0 network={ ssid="example" scan_ssid=1 key_mgmt=WPA-EAP eap=PEAP identity="user@example.com" password="foobar" ca_cert="/etc/cert/ca.pem" phase1="peaplabel=0" phase2="auth=MSCHAPV2" }

Thinstation commented 4 years ago

man wpa_supplicant.conf

jeniha commented 4 years ago

Did I need edit in build conf?

Thinstation commented 4 years ago

That's an example of a custom supplicant. You would then tell thinstation to use the custom supplicant with CUSTOM_SUPPLICANT_CONF="path to supplicant" in .buildtime

jeniha commented 4 years ago

I use ts now only with ethernet. Did i need to change networkmanager or something else?

Thinstation commented 4 years ago

Network manager or autonet. Doesn’t matter.

On Thu, Aug 27, 2020 at 8:43 AM jeniha notifications@github.com wrote:

I use ts now only with ethernet. Did i need to change networkmanager or something else?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Thinstation/thinstation/issues/591#issuecomment-682029886, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVW47UNJ6RNK2SMRACQZW3SCZ5JPANCNFSM4QLWB7LQ .

jeniha commented 4 years ago

Hi, today after 2-3 hours of trying, cant get it to work.For supplicant i use this: ctrl_interface=/run/wpa_supplicant ctrl_interface_group=0 eapol_version=2 ap_scan=0 network={ ssid="ssid" scan_ssid=1 key_mgmt=WPA-EAP eap=PEAP identity="username@domain.com" password="foobar" ca_cert="/etc/cert/ca.pem" phase1="peaplabel=0" phase2="auth=MSCHAPV2" } I made one file that i put it in thinstation folder with name wpa_supplicant.conf.In buildtime i put CUSTOM_SUPPLICANT_CONF="/thinstation/wpa_supplicant.conf" on bottom In build.conf i uncomment package wpa_supplicant and package wireless.Where is my mistake?

BTW:For chiffres we use AES.

Thinstation commented 4 years ago

make a folder in /build/packages/base/ called thinstation, then copy your wpa_supplicant.conf into that folder, then your buildtime and build changes should work.

jeniha commented 4 years ago

Nope, not even a try to connecting in event log in AD.

Thinstation commented 4 years ago

If you want to use wireless autoconnect with a custom wpa_supplicant, you need to use autonet. If you are using ethernet, you can use networkmanager.

jeniha commented 4 years ago

How to enable autonet?

Thinstation commented 4 years ago

in build.conf, comment out networkmanager, then add package autonet

jeniha commented 4 years ago

Nope. again not even a trying to connect.I think i not even reach wpa_supplicant.With ifconfig i can see wireless adapter... In build.conf i make this changes: Enable package autonet Enable package wpa_supplicant Enable package wireless

In buildtime i make this changes: Add in CUSTOM_SUPPLICANT_CONF="/thinstation/wpa_supplicant.conf"

This is in wpa_supplicant : ctrl_interface=/run/wpa_supplicant ctrl_interface_group=0 eapol_version=2 ap_scan=0 network={ ssid="ssid" scan_ssid=1 key_mgmt=WPA-EAP eap=PEAP identity="username@domain.com" password="foobar" ca_cert="/etc/cert/ca.pem" phase1="peaplabel=0" phase2="auth=MSCHAPV2" } Where is my mistake?

Thinstation commented 4 years ago

CUSTOM_SUPPLICANT_CONF is relative to the running file-system, not the build file-system. make a package for the supplicant, or put it in the etc dir of an existing package and then set CUSTOM_SUPPLICANT_CONF="/etc/wpa_supplicant.conf"