How can I set the permissions on eth0 to allow me (as opposed to root) to modify it?
I want to use macchanger from a script and I don't want to have to enter my password every time I run the script. I assume it's the same sort of permission that one would need to be able to use ifconfig to change things on a network interface.
On 14 Feb 11:21, Chris Green wrote:
How can I set the permissions on eth0 to allow me (as opposed to root) to modify it?
I want to use macchanger from a script and I don't want to have to enter my password every time I run the script. I assume it's the same sort of permission that one would need to be able to use ifconfig to change things on a network interface.
Just allow your user no password'd sudo access to macchanger.
Though, I would (obviously) question why a normal user would need to change his mac.
Anyways, in sudoers:
user ALL=(ALL) NOPASSWD: /usr/sbin/macchanger
(or similar).
On Tue, 14 Feb 2012 11:26:06 +0000 Brett Parker iDunno@sommitrealweird.co.uk allegedly wrote:
Though, I would (obviously) question why a normal user would need to change his mac.
I think you answered your own question there Brett. :-)
Mick
On Tue, Feb 14, 2012 at 11:26:06AM +0000, Brett Parker wrote:
On 14 Feb 11:21, Chris Green wrote:
How can I set the permissions on eth0 to allow me (as opposed to root) to modify it?
I want to use macchanger from a script and I don't want to have to enter my password every time I run the script. I assume it's the same sort of permission that one would need to be able to use ifconfig to change things on a network interface.
Just allow your user no password'd sudo access to macchanger.
Of course, I'd not thought of granting permission that way.
Though, I would (obviously) question why a normal user would need to change his mac.
It's just a convenience so that I can run some software that is keyed on the MAC address of the ethernet port on a different (more suitable) machine. I could ask for a new key from the software supplier but they're a bit prickly and it's just simpler to do it this way.
Anyways, in sudoers:
user ALL=(ALL) NOPASSWD: /usr/sbin/macchanger
OK.