[clug] How to Determine which Wireless Lan is connected

David Schoen neerolyte at gmail.com
Tue Sep 29 06:07:23 MDT 2009


2009/9/29 Alex (Maxious) Sadleir <maxious at gmail.com>:
> Gentoo:
> $ ls -l `which iwconfig`
> -rwxr-xr-x 1 root root 21900 2008-01-28 23:52 /sbin/iwconfig
>
> Oh, it's not in the path for normal users but it is usable if you
> specify the full path. I'd thought it wasn't and others [1] seem to
> have made the same mistake (or it really wasn't at one point). In
> tab-complete we trust... too much.
>
> 1: http://ubuntuforums.org/showthread.php?t=389200

Yeh Ubuntu seems to be the odd one out by putting /sbin and /usr/sbin
in to normal $PATH variables, but I think that thread is solving a
different problem.

With iwconfig/iwgetid you can happily read certain bits of data as a
normal user but if you want to update something you need root.
"u+s,o-x" is saying if for some reason you have execute access you can
run this as root. If you then go and set sensible groups, users in the
right group will be able to execute the binary without su(do).

I reckon sudo is the way to go for that though. Sudo can be configured
for passwordless access if needed (for scripts and the like) and will
log every access (nice if you're trying to figure out who's doing what
to your box). Also sudo config shouldn't get clobbered by the distro's
package manager, IIRC even gentoo clobbered "weird" perms on binaries
when I was last using it.

Well I think that's what they're doing anyway.

Cheers,
Dave


More information about the linux mailing list