[clug] How to Determine which Wireless Lan is connected

David Schoen neerolyte at gmail.com
Tue Sep 29 05:52:06 MDT 2009


Oh, also:

dave at gibble:~$ iwgetid --raw
Alan
dave at gibble:~$

Doesn't require parsing :)

Cheers,
Dave


2009/9/29 David Schoen <neerolyte at gmail.com>:
> 2009/9/29 Alex (Maxious) Sadleir <maxious at gmail.com>:
>> As root, you can easily see this in the output of the iwconfig/iwgetid
>> command. These commands aren't accessable as a normal user usually but
>> you can make a user group and give it extra priviledges to the
>> /sbin/iw* files for that if you need to.
>
> Really? On Ubuntu everyone has access:
>
> jail at gibble:~$ iwconfig wlan1 | head -1
> wlan1     IEEE 802.11bg  ESSID:"Alan"
> jail at gibble:~$ ls -l `which iwconfig`
> -rwxr-xr-x 1 root root 26968 2008-11-15 08:21 /sbin/iwconfig
> jail at gibble:~$ groups jail
> jail
> jail at gibble:~$
>
> Assuming I went and set o-x on /sbin/iwconfig I'd have to stick myself
> in the "root" group or chgrp /sbin/iwconfig to something new and fun.
> I'd consider both to be worse hacks than just "chmod o+x `which
> iwconfig`" (which has its own issues if the distro isn't setting that
> value). Does your distro set some other group on the binary?
>
> Cheers,
> Dave
>


More information about the linux mailing list