前段时间听说有一种方法可以更改SGI上的机身号,哪位知道的朋友能否讨论一下 :)
sgi 回复于:2003-07-17 13:24:11
具体指机器的什么值?改了对你有什么用?让sgi公司认为这台机器是刚买的吗?
colcolcat 回复于:2003-07-17 15:04:03
机身号就是
Serial Number:[color=red][size=18]XXXX XXXX XXXX[/size] [/color]
szh 回复于:2003-07-17 15:12:49
引用:原帖由 "sgi"]具体指机器的什么值?改了对你有什么用?让sgi公司认为这台机器是刚买的吗? 发表:
好多软件是通过机器的机器号来算软件的注册码的!!
也许是想改变机器号来实现软件的应用吧!!
不过我知道,机器号是在机器的背板上的一块电池上的,你可以换电池就可以将机器号对调了!
happyx 回复于:2003-07-17 16:07:54
为了软件的应用,请问如何改sgi的hostid.谢谢!
daemonix 回复于:2003-07-17 16:33:16
这个不好在这里讲吧?
colcolcat 回复于:2003-07-17 17:51:54
引用:原帖由 "szh" 发表:
不过我知道,机器号是在机器的背板上的一块电池上的,你可以换电池就可以将机器号对调了!
我想知道如果电池没电的话,是否会有影响
szh 回复于:2003-07-17 17:58:10
我所知道的电池不会没有电的!
colcolcat 回复于:2003-07-17 19:35:34
我找了好久没发现SGI上有电池
sgi 回复于:2003-07-19 19:00:02
# cc -o change-sid change-sid.c -lmld
# sysinfo
System ID:
de ad 12 34 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rodent 44# ./change-sid
hexadecimal system id seems to be dead1234
rodent 45# ./change-sid 12345678
rodent 46# ./change-sid
hexadecimal system id seems to be 12345678
rodent 47# sysinfo
System ID:
12 34 56 78 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-- change-sid.c --
/*
* change system id on IRIX 5.3 - only minimally tested on one machine
* consider this pre-pre-alpha - USE AT YOUR OWN RISK
* compile by -- cc -o change-sid change-sid.c -lmld
* placed in the public domain by the author - Nov 1996
* Mark Henderson <mch@squirrel.com>;
*/
#include <fcntl.h>;
#include <unistd.h>;
#include <stdio.h>;
#include <sys/types.h>;
#include <sys/uio.h>;
#include <nlist.h>;
struct nlist nl[2];
main(argc,argv)
int argc;
char *argv[];
{
int kmem;
int just_read = 0;
unsigned int new_id, cur_id;
off_t where;
just_read = (argc <= 1);
if (argc >; 1)
new_id = strtoul(argv[1], NULL, 16);
if ((kmem = open("/dev/kmem", O_RDWR)) < 0) {
fprintf(stderr, "cannot open /dev/kmem\n");
exit(1);
}
nl[0].n_name="eccf_addr";
nl[1].n_name = NULL;
if (nlist("/unix", nl) < 0) {
fprintf(stderr, "cannot read namelist out of /dev/ksyms\n");
exit(1);
}
if ((where = nl[0].n_value) == 0) {
fprintf(stderr, "unknown kernel variable eccf_addr\n");
exit(1);
}
if (lseek(kmem, where + 4, SEEK_SET) == (-1)) {
fprintf(stderr, "lseek on /dev/kmem failed\n");
exit(1);
}
if (!just_read) {
if (write (kmem, &new_id, 4) < 4) {
fprintf(stderr, "write to /dev/kmem failed\n");
exit(1);
}
}
else {
if (read(kmem, &cur_id, 4) < 4) {
fprintf(stderr, "read failed\n");
exit(1);
}
printf("hexadecimal system id seems to be %08x\n", cur_id);
}
close(kmem);
exit(0);
}
colcolcat 回复于:2003-07-21 14:27:11
厉害!
colcolcat 回复于:2003-07-21 14:30:58
还想问一下sgi大哥,这种改法会永久的改变机器的机身号吗,还是每重装一次系统他都会改变回来
szh 回复于:2003-07-21 16:13:43
其它系统的版本也可以这样修改吗?
sgi 回复于:2003-07-21 17:52:10
应该是永久的,我没有机器来做这个试验!
ddzzd 回复于:2003-07-23 15:45:12
不能永久!
gongdehua 回复于:2003-07-24 13:47:19
换硬盘就变回来了
szh 回复于:2003-07-24 14:18:46
只是软件上的修改!!
风云禾雨 回复于:2004-04-15 11:34:32
# cc -o aa aa.c -lmld
ld32: FATAL 9 : I/O error (-lmld): No such file or directory[size=24][/size]
|