|
From: Thimios D. <dim...@ce...> - 2005-03-13 00:42:34
|
So, Sebastian gave me a user account to investigate this. I am posting
here, since more people might want to see this.
It is most probably a problem with your sudo configuration. It seems
that the user www-data can't run "sudo /sbin/iwconfig"
to see if this is the case, create a file called test.php in your
wifiadmin directory, with the following content:
<?php
include( "include/functions.php");
//this just runs iwconfig, and prints it's output, and the return code
print( system("sudo /sbin/iwconfig", $return_value));
echo("\n $return_value \n");
//the get_wireless_status function, parses the output of iwconfig,
and returns it in an array
print_r(get_wireless_status());
?>
then become www-data, by running:
su - www-data
and now try to execute the above script, running
php test.php
if you don't get the correct output (which is the ouput of iwconfig,
followed by a 0, followed by the pretty-print of the corresponding
array), check your /etc/sudoers file. Mine, looks like this:
# Cmnd alias specification
Cmnd_Alias WIFIADMIN = /sbin/iwconfig, /sbin/ifconfig,
/sbin/iwlist, /sbin/iwpriv, /sbin/route, /usr/bin/host, /usr/sbin/arp
# User privilege specification
root ALL=(ALL) ALL
www-data ALL=(ALL) NOPASSWD: WIFIADMIN
hope this helps.
Thimios Dimopulos wrote:
> There probably is a bug, concerning the way wifiadmin parses the
> output of your wireless tools. Could you give me a temporar user
> acount on your machine to check it out?
>
>
>
>
>
>
> Sebastian Ortwein wrote:
>
>> Am Donnerstag, den 10.03.2005, 19:26 +0200 schrieb Thimios Dimopulos:
>>
>>
>>> Sebastian Ortwein wrote:
>>>
>>>
>>>
>>>> Hey
>>>>
>>>> I get following errors with my Browser in wifiadmin
>>>> in wireless status
>>>>
>>>> Notice: Undefined variable: current in /var/www/wifiadmin/iwstatus.php
>>>> on line 106
>>>>
>>>> Notice: Undefined variable: current in /var/www/wifiadmin/iwstatus.php
>>>> on line 330
>>>>
>>>> status
>>>> This device\'s mode is not supported.
>>>>
>>>>
>>>> Notice: Undefined variable: current in /var/www/wifiadmin/iwstatus.php
>>>> on line 345
>>>>
>>>> ___________________________________________
>>>>
>>>> in wireless settings
>>>>
>>>> Wireless Settings
>>>>
>>>> Notice: Undefined variable: current in
>>>> /var/www/wifiadmin/iwsettings.php
>>>> on line 200
>>>>
>>>> Current settings for device
>>>> ___________________________________________
>>>>
>>>> I used today CVS sources and i try to get it running under debian with
>>>> apache 1.3 and php4. I dont't know where is my problem I have
>>>> installed
>>>> php4-cli but I don't know how to check it.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> Please provide more details. Post the output of the following:
>>>
>>> iwconfig --version
>>>
>>
>>
>> iwconfig Wireless-Tools version 27
>> Compatible with Wireless Extension v11 to v17.
>>
>> Kernel Currently compiled with Wireless Extension v16.
>>
>> eth2 Recommend Wireless Extension v16 or later,
>> Currently compiled with Wireless Extension v16.
>>
>>
>>
>>> iwconfig
>>>
>>
>>
>> lo no wireless extensions.
>>
>> eth0 no wireless extensions.
>>
>> eth1 no wireless extensions.
>>
>> eth2 IEEE 802.11b/g Mode:Managed Frequency:2.422GHz
>> Access Point: 00:00:00:00:00:00 Bit Rate:0kb/s Tx-Power=31
>> dBm
>> Sensitivity=20/200
>> Retry min limit:8 RTS thr:2347 B Fragment thr:2346 B
>> Encryption key:off
>> Link Quality:33 Signal level:0 Noise level:19
>> Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
>> Tx excessive retries:0 Invalid misc:0 Missed beacon:0
>>
>> ppp0 no wireless extensions.
>>
>>
>>
>>> ifconfig
>>>
>>>
>>
>> eth0 Link encap:Ethernet HWaddr 00:50:FC:39:CD:F6
>> inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
>> RX packets:761544 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:643074 errors:0 dropped:0 overruns:1 carrier:0
>> collisions:0 txqueuelen:1000
>> RX bytes:675720758 (644.4 MiB) TX bytes:95344004 (90.9 MiB)
>> Interrupt:12
>>
>> eth1 Link encap:Ethernet HWaddr 00:04:75:9D:5D:62
>> inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
>> RX packets:1910750 errors:0 dropped:0 overruns:2 frame:0
>> TX packets:2343936 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:1000
>> RX bytes:805944616 (768.6 MiB) TX bytes:2692199645 (2.5 GiB)
>> Interrupt:10 Base address:0xb000
>>
>> eth2 Link encap:Ethernet HWaddr 00:01:36:07:11:8C
>> inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
>> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:185 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:1000
>> RX bytes:0 (0.0 b) TX bytes:39463 (38.5 KiB)
>> Interrupt:12
>>
>> lo Link encap:Local Loopback
>> inet addr:127.0.0.1 Mask:255.0.0.0
>> UP LOOPBACK RUNNING MTU:16436 Metric:1
>> RX packets:15140 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:15140 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:0
>> RX bytes:1581832 (1.5 MiB) TX bytes:1581832 (1.5 MiB)
>>
>> ppp0 Link encap:Point-to-Point Protocol
>> inet addr:85.74.8.70 P-t-P:62.104.190.40
>> Mask:255.255.255.255
>> UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1454 Metric:1
>> RX packets:760936 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:642285 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:3
>> RX bytes:658830010 (628.3 MiB) TX bytes:81125850 (77.3 MiB)
>>
>>
>>
>>
>>
>>> if you are using the hostap driver, also post the output of
>>>
>>> ls -lhR /proc/net/hostap/
>>>
>>
>>
>> i have no hostap driver
>>
>>
>>
>> I hope it help. It is the first time I try a wireless connection in
>> Linux. I will use your program for a wireless-linux-router. I use a old
>> debian woody so it can be that same programs are outdated with your
>> webinterface.
>>
>> Thanks for the help
>>
>>
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Wifiadmin-users mailing list
> Wif...@li...
> https://lists.sourceforge.net/lists/listinfo/wifiadmin-users
>
>
|