I want to change my MAC at reboot, so making it a cron job like the following in BSD.
Can I do this in the jail for the user, setting it as a command or should it be a script?
I would set it as a command
openssl rand -hex 6 | sed 's/\(..)/\1:/g; s/.$//'
just to test it, it works.
To make things easier, blinded by the light, I just took the macchanger script from my linux distro and set it already unpacked in the folder of
/home/name of the user/sbin/
setting the flags and doing it at or @reboot.
It works fine with just the command line!!!!
@reboot usernamesomebody openssl rand -hex 6 | sed 's/\(..)/\1:/g; s/.$//'
I am asking this, because the BSD handbook tells me to try it first as a homebrew script in the really
special environment, that is giving me a headache like the following
env -i SHELL=/bin/sh PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin HOME=
And my second question is, would it be better to set it in the system crontab
/etc/crontab
or just user crontab?
So if someone can help me out, thanks in advance!!!