LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 10-04-2023, 09:58 AM   #1
dr_berta
Member
 
Registered: Sep 2005
Location: Carpi (Modena) - Italy
Distribution: Ubuntu 20.04_x86_64 LTS; Slackware 13 64bit; Gentoo, Fedora, Yocto
Posts: 77

Rep: Reputation: 1
wifi p2p connection with wpa_supplicant: how to read/set password


Hello,
I created a p2p wifi connection between a pc with Ubuntu 20.04 and a pc with Win X without any internet connection using wpa_supplicant. The problem I have is that doing a new connection the password, generated by the command
Code:
wpa_cli -iwlan0 p2p_group_add
,changes and I'm not able to see it or export it.

The alternative could be to be able to set the password that will be used by the above command.
The standard way to set ssid and password for the network is not accepted as valid.

Is there someone that could suggest a way to do this?
Thanks
Claudio
 
Old 10-04-2023, 12:25 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,760

Rep: Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931
As far as I know Windows does not have peer to peer wireless ad-hoc capability. Configure it for internet connection sharing and then on Ubuntu use the network manager applet to configure a wireless network with the ssid and password from the Windows 10 computer.

Last edited by michaelk; 10-04-2023 at 12:26 PM.
 
Old 10-05-2023, 02:09 AM   #3
dr_berta
Member
 
Registered: Sep 2005
Location: Carpi (Modena) - Italy
Distribution: Ubuntu 20.04_x86_64 LTS; Slackware 13 64bit; Gentoo, Fedora, Yocto
Posts: 77

Original Poster
Rep: Reputation: 1
You are right if you want to create the hotspot with windows, but in my case the hotspot is created in the Linux pc. Windows is able to detect the ad-hoc wifi connections if you set the correct ip address of the connection.

Claudio
 
Old 10-05-2023, 04:38 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,760

Rep: Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931
Network manager also has an internet connection sharing option that may work even if you only have one interface.
 
Old 10-05-2023, 04:45 AM   #5
dr_berta
Member
 
Registered: Sep 2005
Location: Carpi (Modena) - Italy
Distribution: Ubuntu 20.04_x86_64 LTS; Slackware 13 64bit; Gentoo, Fedora, Yocto
Posts: 77

Original Poster
Rep: Reputation: 1
I tried it, but the ad-hoc connection created using Network Manager is not detected by Windows. For this reason I'm using wpa_supplicant.

Claudio
 
Old 10-05-2023, 05:01 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,760

Rep: Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931
Network manager should use wpa_supplicant as far as I know.

https://wiki.archlinux.org/title/ad-hoc_networking
 
Old 10-05-2023, 05:22 AM   #7
dr_berta
Member
 
Registered: Sep 2005
Location: Carpi (Modena) - Italy
Distribution: Ubuntu 20.04_x86_64 LTS; Slackware 13 64bit; Gentoo, Fedora, Yocto
Posts: 77

Original Poster
Rep: Reputation: 1
I agree with you, NM should use wpa_supplicant in background without the need to specify any configuration for it, but what I'm seeing now is telling me something different.
Ad hoc connection made using network Manager between linux devices works fine.
But it seems that the ad-hoc connection created with Network Manager has not the requirements of a DIRECT-WIFi connection that windows is expecting.

I know that wpa_supplicant requires a specific command to setup a DIRECT-WIFI connection. Probaly this command is not used by NM

Claudio
 
Old 10-05-2023, 11:14 AM   #8
dr_berta
Member
 
Registered: Sep 2005
Location: Carpi (Modena) - Italy
Distribution: Ubuntu 20.04_x86_64 LTS; Slackware 13 64bit; Gentoo, Fedora, Yocto
Posts: 77

Original Poster
Rep: Reputation: 1
I found the solution.
Googling a lot I finally found a document from the developer showing all the available p2p commands for wpa_supplicant.
One of them
Code:
p2p_get_passphrase
provides the password created for a p2p GO connection

Claudio
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Trouble connect to a username and password wifi using wpa_supplicant annn Linux - Wireless Networking 22 03-23-2023 02:48 PM
How to configure wpa_supplicant configuration to handle multiple USB WIiFi devices with single wpa_supplicant configuration file with system chetuneve Linux - Wireless Networking 1 11-18-2020 04:07 PM
[SOLVED] wpa_supplicant docs are set to read-only j_v Slackware 10 01-30-2014 05:53 PM
iptables-p2p - Instalation problems | How to block p2p with iptables Woping Linux - Networking 0 03-14-2006 12:56 PM
Risk of Linux P2P vs. Windows P2P software snatale1 Linux - Software 2 12-04-2004 07:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration