View previous topic :: View next topic |
Author |
Message |
dead_parrot n00b
Joined: 26 Mar 2012 Posts: 27 Location: /EU/PL
|
Posted: Sat Dec 17, 2016 6:10 pm Post subject: [SOLVED] wpa_gui: Could not get status from wpa_supplicant |
|
|
Hi,
I have a problem with access rights to wpa_supplicant (I guess). Wpa_gui run by a user gives message: Could not get status from wpa_supplicant and run by root works fine.
my /etc/wpa_supplicant/wpa_supplicant.conf
Code: |
ctrl_interface=DIR=/var/run/wpa_supplicant
ctrl_interface_group=wheel
update_config=1
|
The user is a member of the wheel group.
I have no idea what is wrong.
Last edited by dead_parrot on Sun Dec 25, 2016 7:24 am; edited 1 time in total |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sat Dec 17, 2016 9:25 pm Post subject: Re: wpa_gui: Could not get status from wpa_supplicant |
|
|
dead_parrot ... please try with:
/etc/wpa_supplicant/wpa_supplicant.conf: | ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1 |
If that behaves similarly then post the output of
Code: | $ ls -ld /run/wpa_supplicant
$ wpa_cli status |
best ... khay |
|
Back to top |
|
|
dead_parrot n00b
Joined: 26 Mar 2012 Posts: 27 Location: /EU/PL
|
Posted: Sun Dec 18, 2016 9:22 am Post subject: |
|
|
Hi khayyam,
Thanks for your reply. Unfortunately, this does not change anything.
The output for ls -ld /run/wpa_supplicant is:
Code: |
drwxr-x--- 2 root root 60 12-18 10:13 /run/wpa_supplicant
|
and for wpa_cli status:
Code: |
Failed to connect to non-global ctrl_ifname: (nil) error: Permission denied
|
Best regards,
dp |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sun Dec 18, 2016 9:56 am Post subject: |
|
|
dead_parrot wrote: | Code: | drwxr-x--- 2 root root 60 12-18 10:13 /run/wpa_supplicant |
|
dead_parrot ... ok, that shows us that group isn't set to wheel. How are you starting wpa_supplicant?
Code: | # egrep -v '^(#|$)' /etc/conf.d/wpa_supplicant
# ps auxwww | grep [w]pa |
best ... khay |
|
Back to top |
|
|
dead_parrot n00b
Joined: 26 Mar 2012 Posts: 27 Location: /EU/PL
|
Posted: Sun Dec 18, 2016 4:16 pm Post subject: |
|
|
khayyam wrote: | How are you starting wpa_supplicant?
|
I understand that via dhcpcd.
egrep -v '^(#|$)' /etc/conf.d/wpa_supplicant gives:
Code: |
wpa_supplicant_args=""
|
and ps auxwww | grep [w]pa gives:
Code: |
root 3187 0.0 0.0 29860 3240 ? Ss 16:52 0:00 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlp6s0
|
|
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sun Dec 18, 2016 5:35 pm Post subject: |
|
|
dead_parrot wrote: | khayyam wrote: | How are you starting wpa_supplicant? |
I understand that via dhcpcd. |
dead_parrot ... so you have '10-wpa_supplicant' in /lib/dhcpcd/dhcpcd-hooks? Try the following:
/etc/conf.d/wpa_supplicant: | wpa_supplicant_args="-Dnl80211 -iwlp6s0 -qq" |
Code: | # /etc/init.d/dhcpcd stop
# rm /lib/dhcpcd/dhcpcd-hooks/10-wpa_supplicant
# /etc/init.d/wpa_supplicant start
# /etc/init.d/dhcpcd start
# ls -l /run/wpa_supplicant |
dead_parrot wrote: | ps auxwww | grep [w]pa: | root 3187 0.0 0.0 29860 3240 ? Ss 16:52 0:00 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlp6s0 |
|
You should be seeing 'wpa_cli' running '/etc/wpa_supplicant/wpa_cli.sh' ... I assume dhcpcd doesn't start this (as 'net.*' would). That doesn't explain the fact that /run/wpa_supplicant is group 'wheel', it should be as this is defined in wpa_supplicant.conf ... that doesn't make sense to me, are you sure that there isn't a typo in the filename, or path?
best ... khay |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3685
|
Posted: Sun Dec 18, 2016 5:55 pm Post subject: |
|
|
khayyam wrote: | Code: | # /etc/init.d/dhcpcd stop
# rm /lib/dhcpcd/dhcpcd-hooks/10-wpa_supplicant
# /etc/init.d/wpa_supplicant start
# /etc/init.d/dhcpcd start
# ls -l /run/wpa_supplicant |
|
@khay,
For running wpa_supplicant with dhcpcd one would need either the old 10-wpa_supplicant hook (and do not run wpa_supplicant as a service) or use CONFIG_MATCH_IFACE=yes. |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sun Dec 18, 2016 8:39 pm Post subject: |
|
|
charles17 wrote: | @khay, [f]or running wpa_supplicant with dhcpcd one would need either the old 10-wpa_supplicant hook (and do not run wpa_supplicant as a service) or use CONFIG_MATCH_IFACE=yes. |
charles17 ... yes, but the above is simply a test to try and get some idea of why /run/wpa_supplicant (and socket) isn't 'root:wheel'. It should be, whether dhcpcd, or net.*, starts it, or if wpa_supplicant is run in isolation ... but from all accounts that isn't happening.
best ... khay |
|
Back to top |
|
|
dead_parrot n00b
Joined: 26 Mar 2012 Posts: 27 Location: /EU/PL
|
Posted: Mon Dec 19, 2016 9:14 pm Post subject: |
|
|
khayyam wrote: |
dead_parrot ... so you have '10-wpa_supplicant' in /lib/dhcpcd/dhcpcd-hooks?
|
Correct.
I removed it, did what you wrote, and received;
Code: |
* Starting WPA Supplicant Daemon ...
Failed to initialize control interface 'DIR=/var/run/wpa_supplicant'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.
nl80211: Failed to open /proc/sys/net/ipv4/conf/wlp6s0/drop_unicast_in_l2_multicast: No such file or directory
nl80211: Failed to set IPv4 unicast in multicast filter
nl80211: Failed to open /proc/sys/net/ipv4/conf/wlp6s0/drop_unicast_in_l2_multicast: No such file or directory
nl80211: Failed to set IPv4 unicast in multicast filter
* start-stop-daemon: failed to start `/usr/sbin/wpa_supplicant'
* Failed to start WPA Supplicant Daemon [ !! ]
* ERROR: wpa_supplicant failed to start
|
killing wpa_supplicnat process and starting it again i got from ls -l /run/wpa_supplicant/
Code: |
srwxrwx--- 1 root root 0 12-19 21:55 wlp6s0
|
and
Code: |
root 4317 0.0 0.0 29860 3608 ? Ss 21:55 0:00 /usr/sbin/wpa_supplicant -Dnl80211 -iwlp6s0 -qq -B -c/etc/wpa_supplicant/wpa_supplicant.conf
|
|
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Mon Dec 19, 2016 11:51 pm Post subject: |
|
|
dead_parrot wrote: | Code: | * Starting WPA Supplicant Daemon ...
Failed to initialize control interface 'DIR=/var/run/wpa_supplicant'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again. |
|
dead_parrot ... "killing" will not "manually remove this file" ...
Code: | # /etc/init.d/dhcpcd stop
# /etc/init.d/wpa_supplicant stop
# rm -f /lib/dhcpcd/dhcpcd-hooks/10-wpa_supplicant
# rm -fr /run/wpa_supplicant
# /etc/init.d/wpa_supplicant start
# /etc/init.d/dhcpcd start
# ls -ld /run/wpa_supplicant |
best ... khay |
|
Back to top |
|
|
dead_parrot n00b
Joined: 26 Mar 2012 Posts: 27 Location: /EU/PL
|
Posted: Tue Dec 20, 2016 7:01 pm Post subject: |
|
|
khayyam wrote: |
dead_parrot ... "killing" will not "manually remove this file" ...
|
the effect:
Code: |
rwxr-x--- 2 root root 60 12-20 19:53 /run/wpa_supplicant
|
|
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Tue Dec 20, 2016 11:55 pm Post subject: |
|
|
dead_parrot wrote: | Code: | rwxr-x--- 2 root root 60 12-20 19:53 /run/wpa_supplicant |
|
dead_parrot ... no change, so what is /run?
Code: | # mount | egrep '(root|run)' |
We should probably get more details of the contents of wpa_supplicant.conf:
Code: | # cat -vET /etc/wpa_supplicant/wpa_supplicant.conf |
... and details about the wpa_supplicant package:
Code: | # emerge -pvq wpa_supplicant |
Also, stop wpa_supplicant, change wpa_supplicant_args to the following, start wpa_supplicant, and pastebin the log.
/etc/conf.d/wpa_supplicant: | wpa_supplicant_args="-Dnl80211 -dd -f /var/log/wpa_supplicant.log" |
best ... khay |
|
Back to top |
|
|
dead_parrot n00b
Joined: 26 Mar 2012 Posts: 27 Location: /EU/PL
|
Posted: Sun Dec 25, 2016 7:24 am Post subject: |
|
|
Dear khayyam,
Thank you very much for your help and patience. You were right from the very beginning. The solution was to have /etc/wpa_supplicant/wpa_supplicant.conf as following
Code: |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1
|
instead of
Code: |
ctrl_interface=DIR=/var/run/wpa_supplicant
ctrl_interface_group=wheel
update_config=1
|
I did a mistake trying this solution putting GROUP=wheel in a separate line. Sorry and thanks again for your help. |
|
Back to top |
|
|
|