레이블이 컴퓨터_기타인 게시물을 표시합니다. 모든 게시물 표시
레이블이 컴퓨터_기타인 게시물을 표시합니다. 모든 게시물 표시

2011년 2월 15일 화요일

크크크

Removing an Excel Workbook VBA Password

A VBA project password can be removed with a hex editor. Close the workbook and open the workbook file in the hex editor. Find the string "DPB" and change it to "DPx". Save the file. Open the workbook and click OK until the workbook is open (one or more dialogs are displayed describing various problems with the VBA project). Press ALT+F11, choose the menu command Tools->VBAProject Properties, navigate to the Protection tab, and change the password but do not remove it (note the new password). Save, close, and re-open the workbook. Press ALT+F11 and enter the new password. Choose Tools->VBAProject Properties, navigate to the Protection tab, and remove the password. Save the workbook.

2010년 5월 4일 화요일

root 권한으로 파일실행

sudo






sudo가 설치가 안되어 있으면 visudo 등을 사용....
















sudo 설치된 상태에서 /etc/sudoers에서 설정하면 특정 그룹에 있는 user가 sudo 명령어 사용할때 passwd 안묻도록 할 수 있음


























if you really want to have a script run as a user and be able to execute commands as root, there are 2 options that I know of.
















  1. Use sudo with stored password:

    #!/bin/sh
    whoami
    sudo -S -p "" whoami <<EOF
    mysuperpassword
    EOF





    Which will output (when run as 'user'):

    user
    root










  2. Use sudo with no password.
    Add a list of the commands that you wish to run into the /etc/sudoers file by running visudo as root. For example, to allow user to run the commands apache2ctl and whoami, add the following:

    User_Alias SPECIAL = user
    Cmnd_Alias SPECIAL_COMMANDS = /usr/sbin/apache2ctl, /usr/bin/whoami
    SPECIAL ALL = NOPASSWD: SPECIAL_COMMANDS





    Or if you really trust user, if it's you for example, you can allow the user to execute any command without a password:

    user ALL=(ALL) NOPASSWD: ALL





    Then when the following script is run by user:

    #!/bin/sh
    whoami
    sudo whoami





    It will output:

    user
    root