In my crontab I have:
@reboot macchanger -r eth0
(changed on my root user). But the MAC address is not changing when I reboot.
macchanger -r eth0 works fine in the terminal.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
Commands have to be prefixed with the directory name and parameters have to be enclosed in double quotes. Assuming your
macchanger resides in the regular path, create a file (with any name) in the
/etc/cron.d directory containing:
SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin @reboot root sleep 15 @reboot root macchanger "-r eth0"