WPA_GUI 仅以 root 身份工作

WPA_GUI 仅以 root 身份工作

WPA_gui 只有在我以 root 身份运行时才会起作用。我知道我需要更改其权限,但我不知道在哪里更改或更改什么。

我尝试将用户添加到 NetDev 组,但没有成功。任何想法都将不胜感激。

谢谢

编辑:我的 /etc/dbus-1/system.d/wpa_supplicant.conf

<!DOCTYPE busconfig PUBLIC
 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
    <policy user="root">
            <allow own="fi.epitest.hostap.WPASupplicant"/>

            <allow send_destination="fi.epitest.hostap.WPASupplicant"/>
            <allow send_interface="fi.epitest.hostap.WPASupplicant"/>

            <allow own="fi.w1.wpa_supplicant1"/>

            <allow send_destination="fi.w1.wpa_supplicant1"/>
            <allow send_interface="fi.w1.wpa_supplicant1"/>
            <allow receive_sender="fi.w1.wpa_supplicant1" receive_type="signal"/>
    </policy>
    <policy group="netdev">
            <allow send_destination="fi.epitest.hostap.WPASupplicant"/>
            <allow send_interface="fi.epitest.hostap.WPASupplicant"/>

            <allow send_destination="fi.w1.wpa_supplicant1"/>
            <allow send_interface="fi.w1.wpa_supplicant1"/>
            <allow receive_sender="fi.w1.wpa_supplicant1" receive_type="signal"/>
    </policy>
    <policy context="default">
            <deny own="fi.epitest.hostap.WPASupplicant"/>
            <deny send_destination="fi.epitest.hostap.WPASupplicant"/>
            <deny send_interface="fi.epitest.hostap.WPASupplicant"/>

            <deny own="fi.w1.wpa_supplicant1"/>
            <deny send_destination="fi.w1.wpa_supplicant1"/>
            <deny send_interface="fi.w1.wpa_supplicant1"/>
            <deny receive_sender="fi.w1.wpa_supplicant1" receive_type="signal"/>
    </policy>
</busconfig>

并从命令组读出

armtc adm cdrom sudo dip plugdev lpadmin netdev sambashare

看起来两者都引用了组 netdev 但仍然没有什么效果。

编辑2:/usr/share/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service & /usr/share/dbus-1/system-services/fi.epitest.hostap.WPASupplicant1.service

[D-BUS Service]
Name=fi.epitest.hostap.WPASupplicant
Exec=/sbin/wpa_supplicant -B -P /run/sendsigs.omit.d/wpasupplicant.pid -u -s -O /var/run/wpa_supplicant
User=root
SystemdService=wpa_supplicant.service

答案1

在 wpa_supplicant.conf 中查找以下行:

# needed for wpa_gui to work 
ctrl_interface=DIR=<Dir on Gentoo: /var/run/wpa_supplicant> GROUP=<Group on gentoo: plugdev> 
# needed to allow wpa_gui to alter the configuration 
update_config=1 

相关内容