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
Locale::Codes::LangFam(3pm)				 Perl Programmers Reference Guide			       Locale::Codes::LangFam(3pm)

NAME
Locale::Codes::LangFam - standard codes for language extension identification SYNOPSIS
use Locale::Codes::LangFam; $lext = code2langfam('apa'); # $lext gets 'Apache languages' $code = langfam2code('Apache languages'); # $code gets 'apa' @codes = all_langfam_codes(); @names = all_langfam_names(); DESCRIPTION
The "Locale::Codes::LangFam" module provides access to standard codes used for identifying language families, such as those as defined in ISO 639-5. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 639-5 language family codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying language families. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $lext = code2langfam('apa','alpha'); $lext = code2langfam('apa',LOCALE_LANGFAM_ALPHA); The codesets currently supported are: alpha This is the set of three-letter (lowercase) codes from ISO 639-5 such as 'apa' for Apache languages. This is the default code set. ROUTINES
code2langfam ( CODE [,CODESET] ) langfam2code ( NAME [,CODESET] ) langfam_code2code ( CODE ,CODESET ,CODESET2 ) all_langfam_codes ( [CODESET] ) all_langfam_names ( [CODESET] ) Locale::Codes::LangFam::rename_langfam ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::LangFam::add_langfam ( CODE ,NAME [,CODESET] ) Locale::Codes::LangFam::delete_langfam ( CODE [,CODESET] ) Locale::Codes::LangFam::add_langfam_alias ( NAME ,NEW_NAME ) Locale::Codes::LangFam::delete_langfam_alias ( NAME ) Locale::Codes::LangFam::rename_langfam_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangFam::add_langfam_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangFam::delete_langfam_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.loc.gov/standards/iso639-5/id.php ISO 639-5 . AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 2011-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-11-04 Locale::Codes::LangFam(3pm)
All times are GMT -4. The time now is 04:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy