Sponsored Content
Operating Systems BSD MAC at @reboot, like some cellphone Post 302989542 by 1in10 on Saturday 14th of January 2017 05:04:22 AM
Old 01-14-2017
MAC at @reboot, like some cellphone

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

Code:
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
Code:
/home/name of the user/sbin/

setting the flags and doing it at or @reboot.

It works fine with just the command line!!!!


Code:
@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

Code:
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
Code:
/etc/crontab

or just user crontab?

So if someone can help me out, thanks in advance!!!

Last edited by 1in10; 01-18-2017 at 05:53 AM.. Reason: SOLVED FINALLY
 

4 More Discussions You Might Find Interesting

1. Linux

Need direction to make code for cellphone in C,C++ or Perl

Hi All, I need a help from the techie guys in this group.Actually, i need to make a code which can make wallpaper and ringtone for a mobile phone using any method. I know C,C++ and perl langauges but doesnot having much knowledge of JAVA. So can anybody tell me that whether i can... (0 Replies)
Discussion started by: basileis
0 Replies

2. Solaris

different between soft reboot and hard reboot

Hi Guru's Can any want here could explain to me the different between soft reboot and hard reboot . Best Regards Seelan (3 Replies)
Discussion started by: seelan3
3 Replies

3. UNIX for Dummies Questions & Answers

Need Help to Reboot to Mac OS X

Hello. Somehow I got out of my gui Mac OS 10.2 into Unix single-user mode. No matter what I've tried, I can't get out of Unix. I've tried the command "reboot" with no success. I've tried a safe boot, an X boot, and a couple of others and nothing seems to work. I can use the Unix commands to... (4 Replies)
Discussion started by: philomaximus
4 Replies

4. Linux

convert avi to cellphone friendly 320x176 mp4 file...ffmpeg to the rescue :)

found a few ffmpeg posts and after a few unsuccessful attempts, I have found a solution :) to encode an avi to to an nokia e71 recognized mp4 format: ffmpeg -y -i inputFILE.avi -acodec aac -ab 72k -s 320x176 -aspect 16:9 -vcodec h264 -b 300k -qcomp 0.6 -qmin 16 -qmax 51 -qdiff 4 -flags +loop... (2 Replies)
Discussion started by: mr_manny
2 Replies
HP-SEARCH-MAC(1)					User Contributed Perl Documentation					  HP-SEARCH-MAC(1)

NAME
hp-search-mac -- HP switch search tool. DESCRIPTION
HP-search-MAC is an util that can query HP switches for their connection table. It then allow you to search for a MAC address and tell you where it is physically connected (best match first). . The functionality is similar to traceroute but on Ethernet level and only for HP switches. USAGE
hp-search-mac [options] [MAC] [...] OPTIONS
hp-search-mac [options] mac [ [options] mac ] [...] options: --dl n Set debug level to n. --help Print this help. --hostname host[=>community] | -h host[=>community] Set a switch name to search. You can also set this in /etc/hp-search-mac.conf or ~/.hp-search-mac.conf. The hash to set is \%switches. Mac: You can use some different formats: ff:ff:ff:ff:ff:ff (hex) ff-ff-ff-ff-ff-ff (hex) 0.123.0.12.0.12.0 (dec) CONFIGURATION: \%switches: This is a normal perl hash of the form \%switches = ("host" => "community", ...); AUTHOR
Ola Lundqvist <ola@inguza.com> SEE ALSO
snmp-walk(1) snmp-get(1) hp-search-mac Mon Apr 7 21:21:44 CEST 2008 HP-SEARCH-MAC(1)
All times are GMT -4. The time now is 04:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy