Question : Can i modify uptime of machine?

Hello all,

I wanted to know if there is a way to modify a machine's uptime. For example when i issue the command     #uptime on a solaris box, is it possible to get fake results? Question goes for any OS.

Answer : Can i modify uptime of machine?

For every OS of the planet? Are you kidding? Every OS has its own method. Beside that, the information you want to know is not written on disk, but in RAM, so it's not even searchable.

I can give you some hints for Linux, which I know: craft a uptime program on your own, which spits out a fixed line. Find the uptime command on filesystem (it should stay on /usr/bin/uptime), rename it in uptime.old and put the fake in its place. Every time the user type 'uptime' your program will be used.

Solaris and MacOSX should work more or less the same way. Windows it's a mistery.
Random Solutions  
 
programming4us programming4us