Plugin 의 key 파일 관련 이슈


For IBM HTTP Server Versions 6.0 or 6.1, issue the gsk7capicmd command to determine if the password being used on your system expires on April 26, 2012. This command is located in your [gsk_root]/bin directory.

gsk7capicmd -keydb -expiry -db "C:\temp\plugin-key.kdb" -pw WebAS

The resulting output indicates the expiration date for the password: For example, the following output indicates that the password expires on April 26, 2012 at 11:20:31 AM EDT:

Validity: Thursday, 26 April 2012 11:20:31 AM Eastern Daylight Time

Issue a gsk7 command, similar to the following command, to change the password that is expiring:

gsk7capicmd -keydb -changepw -pw xxxx -new_pw yyyy -stash -db plugin
-key.kdb 

If you want to the new password to expire after a specific number of days, add -expire to the gsk7capicmd command line and specify the number of days for which you want the new password to be valid.

Note 1: IMPORTANT: Setting the -expire parameter to 0 means that the password associated with the key database does not expire.

Note 2: GSKit versions prior to 7.0.3.17 do not recognize the -expire parameter. If you are using one of these prior GSKit versions, you must upgrade to the latest GSKit 7.0.4.x version.


Note 3: There is a behavior difference between GSKit 7.0.3.x and 7.0.4.x when using these commands. Leaving the -expire off when using GSKit 7.0.4 results in a password that never expires. Leaving the -expire off when using GSKit versions prior to 7.0.3.17 results in a password expiring in one year. Leaving the -expire off when using GSKit versions equal to and later than 7.0.3.17 results in a password that never expires.

Note 4: GSKit Versions 7.0.3.9 and earlier do not recognize the -new_pw parameter. Instead, you will be prompted for the new password and then asked to confirm the new password.


Frequently asked questions (FAQs):

Q: What happens if I do nothing?
A: You might not notice anything on April 26, 2012, but after the web server is restarted or it loads a new copy of the plugin-cfg.xml due to propagation, the web server plug-in will fail to initialize the HTTPS transports. The plug-in will rely on HTTP (non-ssl) transports to communicate to the WebSphere Application Server, and the plug-in log will contain error messages similar to the following messages:

  • ERROR: lib_security: initializeSecurity: Failed to initialize GSK environment 
    ERROR: ws_transport: transportInitializeSecurity: Failed to initialize security


Q: Can I use the same password?
A: You can not supply the existing password and tell it to change it to that same one. You must specify a new password.

Q: What if I find the password problem within my plug-in from WebSphere Application Server Version 4.0.x?
A: The plug-in from WebSphere Application Server Version 4.0 used GSKit Version 5. You can use the gsk5ikm GUI to change the password or use the gsk5cmd to alter the password. If it's more convenient, you can backup and copy the kdb file to a GSKit 7.0.4 environment and use the tools there to change the password.

Q: How do I correct the password problem if I am running on z/OS?
A: You can use the z/OS gskkyman utility. To use this utility to display the expiration date, issue a command similar to the following command:

gskkyman -dk -k plugin-key.kdb To fix the expiration date, you must complete the following steps, which includes changing the password:

  1. Navigate to the location of the plugin-key.kdb file.
  2. Enter gskkyman.
  3. From the menu provided, choose option "3 - Change database password".
  4. Prompt: "Enter key database name (press ENTER to return to menu):" (Enter plugin-key.kdb).
  5. Prompt: "Enter database password (press ENTER to return to menu):" (Enter WebAS).
  6. Prompt: "Enter new database password (press ENTER to return to menu):" (Enter your new password).
  7. Prompt: "Re-enter database password:" (Re-enter the password).
  8. Prompt: "Enter password expiration in days (press ENTER for no expiration):" (decide if you want this password to expire).

After the password is set, use the following command to stash the new password to a file for the plugin to utilize the updated kdb file.

gskkyman -s -k plugin-key.kdb 


Q: How do I correct the password problem if I am running on IBM i?
A: IBM i provides a utility called Digital Certificate Manager. This tool can be used to change the password, but it does not provide a means to view the expire value.

To view the password expiration value, copy the plugin-key.kdb file to a distributed environment, such as Microsoft Windows, and use either iKeyman or gsk7capicmd utilities previously described in this Flash.

To change the password, complete one of the following actions.

If you are running on IBM i V5R4, complete the following steps:

  1. Start the HTTP Admin server if it is not already running:

    STRTCPSVR SERVER(*HTTP) HTTPSVR(*ADMIN) 
  2. In the browser, enter the following:

    machine:2001 (enter credentials)
  3. Click Digital Certificate Manager.
  4. Click Select a certificate store.
  5. Select Other system certificate store, and then click Continue.
  6. Enter the path to the plugin-key.kdb file in the Certificate store path and file name: field.
  7. Click Reset password.
  8. Enter the new password, confirm the new password, and then take the default options.

    - Automatic login
    - Password does not expire
  9. Click Continue.
The operation is successful if you see the message "The password has been reset." If you are running on IBM i V6R1or V7R1, complete the following steps:
  1. Start the HTTP Admin server if it is not already running:

    STRTCPSVR SERVER(*HTTP) HTTPSVR(*ADMIN) 
  2. In the browser, enter the following:

    machine:2001 (enter credentials)
  3. Expand IBM i management and click Internet Configurations.
  4. Click Digital Certificate Manager.
  5. Click Select a certificate store.
  6. Select Other System Certificate Store, and then click Continue.
  7. Enter the path to the plugin-key.kdb file in the Certificate store path and file name: field.
  8. Click Reset password.
  9. Enter the new password, confirm the new password, and then take the default options:

    - Automatic login
    - Password does not expire
  10. Click Continue.
The operation is successful if you see the message "The password has been reset." 



--------------------원문 

WebSphere Plugin 의 key 파일이 4월 27일 만기된다고 합니다. 
(모든 plugin kdb 파일은 아님)

   1.만기 날짜 확인 방법
C:\IBM\HTTPServer\bin>gsk7capicmd -keydb -expiry -db "C:\IBM\HTTPServer\Plugins\config\webserver1\plugin-key.kdb" -pw WebAS

   2.패스워드 및 만기일 변경
C:\IBM\HTTPServer\bin>gsk7capicmd -keydb -changepw -db C:\IBM\HTTPServer\Plugins\config\webserver1\plugin-key.kdb -pw WebAS -new_pw WebAS1 -expire 3650 -stash

   3.변경된 만기일 확인
C:\IBM\HTTPServer\bin>gsk7capicmd -keydb -expiry -db "C:\IBM\HTTPServer\Plugins\config\webserver1\plugin-key.kdb" -pw WebAS


------------ AIX -------
root [/]#find . -name gsk7capicmd -print
./usr/bin/gsk7capicmd
./usr/opt/ibm/gskta/bin/gsk7capicmd
root [/]#cd /usr/bin

root [/usr/bin]#gsk7capicmd -keydb -expiry -db "/IBM/Plugins/config/webserver1/plugin-key.kdb" -pw WebAS
Validity:  Friday, 27 April 2012 00:20:31 AM KORST

root [/usr/bin]#gsk7capicmd -keydb -changepw -db /IBM/Plugins/config/webserver1/plugin-key.kdb -pw WebAS -new_pw WebAS1 -expire 3650 -stash

root [/usr/bin]#gsk7capicmd -keydb -expiry -db "/IBM/Plugins/config/webserver1/plugin-key.kdb" -pw WebAS1                                  
Validity:  Thursday, 21 April 2022 13:12:40 PM KORST

WebSphere profiles 삭제 및 생성

Profiles Create and Delete


Test Environment

  • Test OS : Windows 10
  • Test Version : WebSphere v8.0

manageprofiles Options

Options

   함수:
      프로파일을 작성, 표시, 변경 또는 삭제합니다.
   구문:
      manageprofiles -<mode> -<argument> <argument parameter> ...
   사용 가능한 모드는 다음과 같습니다.
      create
      augment
      delete
      unaugment
      unaugmentAll
      deleteAll
      listProfiles
      listAugments
      backupProfile
      restoreProfile
      getName
      getPath
      validateRegistry
      validateAndUpdateRegistry
      getDefaultName
      setDefaultName
      response
      help

Create command

Options

   함수:
      새 프로파일을 작성합니다.
   구문:
      manageprofiles -create -<argument> <argument parameter> ...
   인수:
      다음 명령행 인수는 이 모드의 경우 필수입니다.
         -templatePath <argument parameter>: 프로파일 템플리트의 완전한 경로 이름은 파일 시스템에 있습니다.
         -profileName <argument parameter>: 프로파일의 이름입니다.
         -profilePath <argument parameter>: 파일 시스템에서 프로파일의 예상 위치.
      다음 명령행 인수는 선택적이며 기본값이 없습니다.
         -isDefault <argument parameter>: 이 프로파일을 프로파일 매개변수를 사용하지 않는 명령의 기본 대상으로 만드십시오.
         -omitAction <argument parameter>: 선택 기능을 생략하십시오.

Dmgr
manageprofiles.bat -create -profileName Dmgr01 -templatePath C:\nd61\WebSphere\AppServer\profileTemplates\dmgr -profilePath C:\nd61\WebSphere\AppServer\profiles\Dmgr01
AppSrv
manageprofiles.bat -create -profileName AppSrv01 -templatePath C:\nd61\WebSphere\AppServer\profileTemplates\managed -profilePath C:\nd61\WebSphere\AppServer\profiles\AppSrv01

Delete command

Options

   함수:
      프로파일을 삭제합니다.
   구문:
      manageprofiles -delete -<argument> <argument parameter> ...
   인수:
      다음 명령행 인수는 이 모드의 경우 필수입니다.
         -profileName <argument parameter>: 프로파일의 이름입니다.

delete
./manageprofiles.sh -delete -profileName Dmgr01
./manageprofiles.sh -delete -profileName AppSrv01
deleteAll
./manageprofiles.sh -deleteAll

Backup or Restore command

Options

  함수:
     프로파일을 백업합니다.
  구문:
     manageprofiles -backupProfile -<argument> <argument parameter> ...
  인수:
     다음 명령행 인수는 이 모드의 경우 필수입니다.
        -profileName <argument parameter>: 프로파일의 이름입니다.
        -backupFile <argument parameter>: 출력 Zip 파일의 위치입니다.
 
   함수:
      백업 프로파일을 복원합니다.
   구문:
      manageprofiles -restoreProfile -<argument> <argument parameter> ...
   인수:
      다음 명령행 인수는 이 모드의 경우 필수입니다.
         -backupFile <argument parameter>: 출력 Zip 파일의 위치입니다.

profile backup sample
manageprofiles -backupProfile -profileName Dmgr01 -backupFile c:\20080509.zip

profile restore sample
manageprofiles -restoreProfile -profileName Dmgr01 -backupFile c:\20080616.zip

Basic account-related commands in the OS


Basic account-related commands in the OS.


Test Environment

  • Test OS : CentOS 7.2

useradd & adduser 명령어로 생성

useradd 생성

useradd test : test 계정생성 (계정 생성은 root에서 생성)

passwd 생성

passwd test : test의 암호 생성 시

New password 입력  
다시 한번 확인 Retype new password 설정  
(암호 설정 시 심플한 암호나 6자 이내 암호 설정은 안되지만, root 계정에서 강제로 생성이 가능)
[root@localhost]# adduser wasadmin
[root@localhost]# passwd wasadmin
 
Changing password for user wasadmin.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.
  • su test : test 계정 접속
  • su - : 루트 계정 접속
  • passwd : 현재 UID의 password를 변경
  • cd ~ : 홈 디렉터리

user 디렉토리 지정

d : 홈 디렉터리 지정

u : 계정 고유번호 지정(사용하지 않는 계정 고유번호를 지정)

g : 그룹 고유번호 지정(그룹 고유번호는 존재하는 고유번호를 지정)

c : 설명 지정(" " 사이에 설명을 넣으면 공백을 포함시킬 수 있다.)

s : 쉘 지정

[root@localhost]# useradd -d /home/was/ test 
[root@localhost]# useradd -d /home/was/ test -u 510 -g 500 -c "was디렉토리" -s /bin/csh test
 
vi etc/passwd 
- 보통 앞의 내용 처럼 adduser, passwd를 사용하면 그 정보의 내용들이 /etc/passwd에 저장이 됩니다.
 
root  : *  : 523 :  523 : Linux User : /home/was  : /bin/bash
userName : passwd : UID : GID : userInfo : directory : shell
- ps password의 경우 암호화 되어서 보여진다.
 
UID : 사용자 명 ( -u 옵션으로 계정 고유번호 지정 가능)
GID : 그룹 명 ( -g 옵션으로 그룹 고유번호 지정 가능)
 
group
 
vi etc/group
root:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin,adm
adm:x:4:root,adm,daemon
.
.
dip:x:40:
ftp:x:50:

chmod

  • 사용 예)
    • chmod u+x test.log
      파일의 소유자에게 실행 권을 준다. u는 소유자를 의미
    • chmod u-rwx test.log
      파일의 소유자에게 모든 권한을 해제
    • chmod g+wx test.log
      파일의 그룹소유자에게 쓰기와 실행 권한을 준다. g는 그룹을 의미
    • chmod o-r+wx test.log
      파일의 기타계정에게 읽기 권한을 빼고, 쓰기와 실행 권한
    • chmod 755 test.log
      가장 많이 사용하는 방식

      755 중 첫번째는 소유자 두번째는 그룹 세번째는 기타 사용자를 뜻한다.

chown

chown [ 옵션 ] 사용자 대상파일명

-c : 실제로 파일의 소유권이 바뀐 파일만 자세히 기술한다.

-v : 명령의 결과를 자세히 출력한다.

-R : 하위 디렉토리와 파일의 소유권까지 한 번에 변경한다.

chown -R UID:GID 폴더경로

chown 으로 해당 디렉토리의 소유자를 변경하고

chmod 로 각 디렉토리의 퍼미션을 설정하여 파일의 보안 설정을 높일수 있음.

chmod : 파일의 소유자/소유그룹/다른사용자의 파일 권한(읽기/쓰기/실행) 변경

chown : 파일의 소유자와 소유 그룹을 변경

chown [옵션(cfvR)] 소유자:소유그룹 파일명

  • 사용 예)
    • chown -R user:group /home/was -> was/ 하위 파일까지의 모든 소유자를 user / 소유그룹을 group 로 변경
    • chown user test.txt -> test.txt 파일의 소유자를 user로 변경
    • chown :group test.txt -> test.text 파일의 소유 그룹을 group 로 변경

chgrp

usermod (유저설정후 수정하는것 uid등 쉘이등 수정, 홈디렉토리)

userdel (유저삭제)

useradd (유저등록)

사용자 추가
adduser (id)

추가한 사용자에게 비밀번호 부여
passwd (id)

소유자,  그룹 , 제3자(사이트방문자)  
Owner, Group, Other  
rxw     rxw    rxw  
 
Read     4  읽기
Write    2  쓰기
Exe 실행 1  실행권한
합쳐서 7이면 모든권한이다. (소유주가4)
 
폴더 권한
-R(재귀)로 하면은 하위폴더까지 전부다 한다는것
chmod -R 754 마지막에 4를 붙여야 다른데는 접근 못함
chmod -R 755 폴더명
 
퍼미션 설정
[ugoa...][[+-=][rwxXs-tugo...]...][,...]
     1          2          3       ,로 재귀
1 : u(소유자) g(그룹) o(다른 사용자) a(모든 사용자) / 생략시 모든 사용자로 간주
2 : +(권한부여) -(권한박탈) =(원래권한)
3 : r(읽기) w(쓰기) x(실행 / 디렉토리일 경우 접근허용)
    X(다른 사용자에게 실행 권한이 있는 파일의 실행)
    s(소유자와 그룹만 실행)
    u(소유주 권한)
    g(그룹권한)
    o(다른 사용자 권한)
, 로 위의 설정 재귀 반복
 
사용 예) chmod u+w aaa.txt -> 소유자(u) 에게 쓰기권한(w) 을 더한다(+) 
읽기권한 : 4 (100)
쓰기권한 : 2 (010)
실행권한 : 1 (001)
 
읽기 + 쓰기 : 6(4 + 2)
읽기 + 실행 : 5(4 + 1) 
읽기 + 쓰기 + 실행 : 7 (4 + 2 + 1)
 
7 = 4+2+1 = r(4) + w(2) + x(1) = 일기, 쓰기, 실행이 모두 가능
6 = 4+2 = r(4) + w(2) = 읽기와 쓰기가 가능.
5 = 4+1 = r(4) + x(1) = 읽기와 실행이 가능.
4 = 4 = r(4) = 읽기만 가능.
3 = 2+1 = w(2) + x(1) = 쓰기와 실행이 가능.
2 = 2 = w(2) = 쓰기만 가능.
1 = 1 = x(1) = 실행만 가능.
0 = 0 = none = 아무 권한 없음. 파일 접근이 차단됨.
 
사용 예) ls -al
-   rw-  ---  r--    1   user  group             6    09월 10 22:01   test.txt
 
1    2    3    4     5     6     7               8           9           10
 
1 :  타입( - : 파일 / d : 디렉토리)
2 : 소유자 권한 ( 읽기/쓰기/실행)
3 : 그룹 권한 ( 읽기/쓰기/실행) 
4 : 다른사용자 권한 ( 읽기/쓰기/실행)  
5 : 링크수
6 : 소유자
7 : 그룹
8 : 파일크기
9 : 만든 날짜/시간
10 : 파일 이름
 
사용 예) chmod 777 test.txt -> 소유자 / 소유그룹 / 기타 사용자 에게 모든 퍼미션을 허용
- rwx rwx rwx    1  user  group             6 09월 10 22:01 test.txt
    2     3     4

이 블로그 검색

Popular Posts

WEB&&WAS

OS

Reviews