User: Password:
|
|
Subscribe / Log in / New account

Picking a MAC address for a FreedomBox

Picking a MAC address for a FreedomBox

Posted Dec 6, 2012 15:26 UTC (Thu) by rahulsundaram (subscriber, #21946)
Parent article: Picking a MAC address for a FreedomBox

surprised noone mentioned macchanger

http://www.alobbs.com/macchanger

It can do the job of emulating an address that looks it is coming from a particular vendor. I have a NM script in my Fedora box that changes MAC address every time I connect to my wireless network. It is rather trivial to do.


(Log in to post comments)

Picking a MAC address for a FreedomBox

Posted Dec 8, 2012 6:31 UTC (Sat) by mathstuf (subscriber, #69389) [Link]

Is your NM script available somewhere? Maybe one of these days, I'll move to NM from WPA_supplicant, but the bugs (or missing features if you want) I care about probably still exist.

Picking a MAC address for a FreedomBox

Posted Dec 8, 2012 17:24 UTC (Sat) by rahulsundaram (subscriber, #21946) [Link]

I have a file named 00-a-machanger in /etc/NetworkManager/dispatcher.d

--

#! /bin/bash

/bin/macchanger -r wlan0 2>&1 > /dev/null

--

That's all it takes.

Picking a MAC address for a FreedomBox

Posted Jan 21, 2013 16:52 UTC (Mon) by mcortese (guest, #52099) [Link]

/bin/macchanger -r wlan0 2>&1 > /dev/null
The redirection looks weird: stdout goes to null, while stderr goes to stdout! ;-)

Picking a MAC address for a FreedomBox

Posted Jan 21, 2013 19:00 UTC (Mon) by rahulsundaram (subscriber, #21946) [Link]

Use whatever redirection works for you.

Picking a MAC address for a FreedomBox

Posted Jan 22, 2013 0:32 UTC (Tue) by dlang (subscriber, #313) [Link]

that is the routine redirect combination that admins use when they don't plan to look at whatever output is generated and want it to be quiet. The result is that all output is thrown away.

Picking a MAC address for a FreedomBox

Posted Jan 22, 2013 1:04 UTC (Tue) by ABCD (subscriber, #53650) [Link]

No it isn't. command 2>&1 >/dev/null first copies fd 1 to fd 2 (thus sending stderr to where stdout is currently going), then sets fd 1 (stdout) to /dev/null. The standard "show me nothing" line is command >/dev/null 2>&1, which sets fd 1 to /dev/null, then copies fd 1 to fd 2.

To see the difference, compare the following:

$ to_stderr() { echo "$@" >&2; }
$ to_stderr test 2>&1 >/dev/null
test
$ to_stderr test >/dev/null 2>&1


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds