Changing the output of uname -m or -p

Kris Kennaway kris at FreeBSD.org
Sun Jan 13 16:03:45 PST 2008


Christian Baer wrote:
> Hello Folks!
> 
> This may be a bit of a hacker's question, but I'll just go for it in here
> - at least for starters.
> 
> I want to play a prank on a friend of mine. He does a csup at least once a
> day and also makes a new world at least once a day. He is pretty nutty
> about that which is ok for some -CURRENT system, but he also does that on
> production systems.
> 
> Now I don't want to judge him about that, but he is a bit sensitive about
> the output of uname. The version is very important to him. :-)
> 
> The prank I want to pull is to somehow change the output of uname -m to
> read something different. The best thing would be to change that to
> something ancient like C-64, i286, i8086. Or, if only plattforms that
> FreeBSD supports are allowed, then mips, alpha or sparc64 on an i386. That
> should keep him thinking for a while. :-)
> 
> I don't want to do any damage, so I just want to screw up the output of
> uname and the system should work normally apart from that. I realise that
> I may have to change some of the OS's code and that's not a problem. I
> just don't know where to look for this kind of thing and I don't really
> want to do too much reading just for a little prank.
> 
> This guy is a really good friend of mine but sometimes get up my neck
> because I am much more conservative about updating my production systems.
> As you can see on this machine, I go along the lines of RELENG_6_2 which
> he can't understand. This should buy me a little peace and quite for a
> week or two. Getting access to his machines is no problem as I am often at
> his place.
> 
> Can this even be done and if so how?

See the manpage, and the UNAME_* variables.

Kris


More information about the freebsd-questions mailing list