주식회사 누리아이티

정보자산의 보안강화를 위한 3단계 인증 보안SW(BaroPAM) 전문기업인 누리아이티

▶ Tuxedo/기술자료

개발시 사용하면 편리한 프로그램

누리아이티 2010. 5. 2. 20:11

1.Tuxedo 관리자 이외의 Login-ID로 "tmboot, tmshutdown"을 실행
  - 프로그램명 : tmstart, tmstop
  - 프로그램 source 화일
 

#include <stdio.h>

int main(int argc, char *argv[]) {
    char cmdstr[1024];
    int  i = 0;

    memset(cmdstr, 0x00, sizeof(cmdstr));

    if (strcmp(argv[0], "tmstart") == 0) {
        strcpy(cmdstr, "tmboot ");
    } else if (strcmp(argv[0], "tmstop") == 0) {
        strcpy(cmdstr, "tmshutdown ");
    } else {
        return(-1);
    }
    for(i = 1; i < argc; i++) {
        if ((strcmp(argv[i], "-i") != 0) && ((strcmp(argv[i], "-s") != 0))) {
            printf("You can use -i or -s options only !\n");
            return(-1);
        } else {
            strcat(cmdstr, argv[i]);
        }
    }
    return(system(cmdstr));
}

  - 프로그램 실행
    > cc -v -o tmstart tmstart.c
    > /usr/vac/bin/xlc_r -v -o tmstart tmstart.c
    > cp tmstart tmstop
    > chmod +s tmstart
    > chmod +s tmstop
    > tmstart -s 서버명 | -i 서버ID
    > tmstop  -s 서버명 | -i 서버ID

 

2.주의사항
  - Tuxedo Admin 계정으로 작업(컴파일, 권한부여)해야 함.
  - tmstart, tmstop 실행 파일에 +s 권한 부여
    안하면) tmboot: CMDTUX_CAT:1113: ERROR: Must be the administrator to execute this command
  - TUXDIR, TUXCONFIG 환경변수를 설정해야 함.
    안하면) tmshutdown: internal error: CMDTUX_CAT:1360: ERROR: configuration file not found