본문으로 바로가기

대상 서버 : HP-UX B.11.31
               (pwconv 명령어를 통해 shadow가 생성된 상태에서 테스트 스크린샷, 생성 전에도 결과는 같았다.)

HP 서버에서 패스워드 최소자리 9자리 설정에 관한 이슈 사항이 있어서 테스트 해보았다.

패스워드 최소 자리 설정은 SAM에서 설정하는 방법과 /etc/default/security에서 MIN_PASSWORD_LENGTH 값을 수정해주는 방법이 있다.

(LongPass11i3 설치 및 사용방법은 하단부에 추가)

1) SAM에서 설정하는 방법

- SAM 명령어를 치고 'c - Auditing and Security Attributes Configuration(new)'에서 's - System Defaults'로 들어간다.

<SAM 기본 설정>

- PASSWORD_MIN_LENGTH에서 엔터를 치고, m을 누르면 수정이 가능하다.

<패스워드 최소자리 변경>

 - 보이다시피, Untrust 모드에서는 3에서 8까지만 설정이 가능하다. 매뉴얼을 찾아보면 11.31 기준 Untrust모드에서는 3-8자리, Trust 모드에서는 6-80자리 설정이 가능하다고 한다. 

<HP 11.31 MIN_PASSWORD_LENGTH 매뉴얼>

- 다시 상단 설정 창에서 9를 입력하는 경우 에러가 발생하게 된다. 

<9자리 설정시 범위를 벗어났다고 에러 발생>

- 8 입력시 설정이 완료되는 것을 확인할 수 있다.

<패스워드 최소자리 8자리 설정>
<test1 계정 패스워드 변경시 8자리 적용 확인>

- 별다른 재시작 과정 없이 즉시 적용이 된다. 패스워드 기본 규칙은 적어도 두자리 이상의 알파벳과 하나 이상의 숫자 또는 특수문자를 포함해야하고, 앞의 패스워드와 적어도 3자리 이상 달라야 한다.

<패스워드 변경 중간 에러메시지>

2) /etc/default/security에서 MIN_PASSWORD_LENGTH 값을 수정

- 직접 vi로 해당 값의 주석을 제거하고 값을 수정해준다.

<최 하단에 MIN_PASSWORD_LENGTH 값이 8이 되어있음을 확인>

- SAM에서 수정한 값이 적용되어 있는 듯 하다. 해당 구문을 제거하고 SAM에 들어갔더니, 8에서 default로 값이 변경되어 있었다. 결과적으로 SAM에서 수정하면 /etc/default/security가 수정된다고 보면 될 것 같다.

<최소자리 8로 변경>

- 다시 최소자리 8로 변경, sam에서 확인시 default가 아닌 8로 설정되어 있는 것을 확인할 수 있음

<8자리 이상으로 설정>

- 8자리 적용이 되었다. 여기서 제일 중요한 9자리 설정 가능 여부

<최소 길이 9로 변경>
<13자리를 써도 에러 발생>

- 9로 설정 후 패스워드 재 설정시, 9자리가 넘는 값을 써도 무조건 9자리를 넘어야한다며 설정이 불가하였다.
  'testtest1234!'(13자리)를 했지만 에러가 발생하고 되지 않음

<9로 변경된 모습>

- 해당 설정시 SAM 화면에서도 9로 되어 있는 것을 확인할 수 있다. SAM에서 변경은 불가했으나, /etc/default/security 값을 읽어오는 것으로 보인다.

※ 결론
 - SAM 화면은 /etc/default/security 값을 읽어오는 것이며, 기본적으로 Untrust모드에서 패스워드는 8자리 제한까지만 사용가능하다. 그러나 root 계정으로 passwd '해당 계정명' 명령어를 통해서는 자릿수 제한 없이 설정이 가능하다.
(sam, /etc/default/security 값 무시)

 - 주요정보통신기반시설 진단 가이드의 공공기관 기준 9자리 패스워드를 설정하려면, MIN_PASSWORD_LENGTH 값은 별 의미가 없고, root 계정을 통해 각 계정들의 패스워드 자릿수를 설정해주고 사용해야 한다.

 - LongPass11i3를 설치하면, 9자리 이상의 패스워드를 설정하고 실제로 사용할 수 있다.


LongPass11i3 설치 및 사용법

- 설치 방법

1. HP_UX_11i_v3_LongPass11i3web0911 파일을 다운받는다.(HP 사이트 로그인 필요)

-> 직접 다운로드 링크

https://myenterpriselicense.hpe.com/cwp-ui/free-software/LongPassword11i3

 

My License Portal

 

myenterpriselicense.hpe.com

-> 검색 링크

https://myenterpriselicense.hpe.com/cwp-ui/free-software

 

My License Portal

 

myenterpriselicense.hpe.com

에서 Long으로 검색 후, HP-UX 서버를 누르고 HP-UX LongPassword를 눌러 다운로드 받아도 된다.

2. HP 서버에 FTP, SFTP등으로 해당 파일을 집어 넣고, swinstall 명령어를 실행한다.

3. Source Depot Type을 Local Directory로 설정하고, Source Depot Path에 파일 경로 및 이름까지 기입한다.
   (경로만 기입하면 에러가 발생한다, 파일명까지 꼭 다 써주자) 

<swinstall을 통한 설치>

4. OK를 누르면 해당 소프트웨어 목록이 나온다, 전체를 다 선택하고 [Actions]-Install을 눌러주고 진행하면 설치가 된다.

5. swlist | grep Long* 로 설치내역을 확인한다.

<설치내역 확인>

- 사용 방법(LongPass가 설치되어도, SAM 상에는 패스워드 최소 길이 범위가 3-8로 나온다.)

1. vi /etc/default/security 하단에 다음과 같은 내용을 추가한다.

LONG_PASSWORD=1

그리고 원하는 자릿수로 MIN_PASSWORD_LENGTH를 설정한다.

MIN_PASSWORD_LENGTH=10

2. SAM 상에서는 기존의 8자리까지만 변경이 가능하지만, /etc/default/security에서 수정하는 경우 제대로 적용이 된다.

<LONG_PASSWORD=1 적용시>
<LONG_PASSWORD=1에 주석처리를 하여 적용 안되는 상황>

LONG_PASSWORD_LENGTH=1 설정을 하면 /etc/default/security에 설정한 최소 길이 값이 적용된다.
적용을 안 하는 경우 위쪽에 쓴 것처럼 10자리를 넘게 써도 에러가 발생한다. 

해당 번들 설치시, Password Hash Infrastructure for HP-UX 11i v3 (PHI11i3) 패키지도 같이 설치되며, man security에 PHI, LongPass 관련 내용이 추가된다. CRYPT_ALGORITHMS_DEPRECATE, CRYPT_DEFAULT, LONG_PASSWORD 내용이며, LONG_PASSWORD 이외에는 기본값으로 적용되어, pwconv 사용시 /etc/shadow에 암호화가 $6$로 되어있는 것을 확인할 수 있다. 

- man security 내용

  • CRYPT_ALGORITHMS_DEPRECATE
    This attribute lists the password hash algorithms that must be deprecated when a user's password is changed.
    This attribute is only valid when the SHA11i3 product is installed.
  • CRYPT_DEFAULT
    This attribute specifies the default password hash algorithm.  It is used when a new user password is created, and either the user did not have a password before or the old password was hashed with a deprecated algorithm (listed in CRYPT_ALGORITHMS_DEPRECATE).  The value of CRYPT_DEFAULT should not be present in CRYPT_ALGORITHMS_DEPRECATE. This attribute is only valid when the SHA11i3 product is installed.
    CRYPT_DEFAULT=__unix__   The default hash algorithm is the traditional DES-based algorithm.
    Refer to crypt(3C) for more information.

    CRYPT_DEFAULT=6 The default hash algorithm is method 6, a newer hash algorithm based on SHA-512.

    For example:
                              CRYPT_ALGORITHMS_DEPRECATE=__unix__
                              CRYPT_DEFAULT=6
    If a user's password is created for the first time, it is hashed using method 6.  Or if a user's old password was hashed using __unix__, the new password is hashed using method 6.

                              Default value: CRYPT_DEFAULT=__unix__
  • LONG_PASSWORD
    This attribute determines whether or not the length of a password can exceed 8 characters.
    This attribute is valid only when the LongPassword11i3 product is installed and the password hash algorithm is different from the traditional DES-based hash algorithm, see CRYPT_DEFAULT.

    LONG_PASSWORD=0   Passwords are limited to 8 characters.

    LONG_PASSWORD=1   Passwords can have more than 8 characters.

                              Default value: LONG_PASSWORD=0

※ 결론 
- LongPass를 설치하고, /etc/default/security에서 LONG_PASSWORD=1을 추가하고, MIN_PASSWORD_LENGTH를 9 이상으로 설정하여 사용하면 된다.
- 외국 게시물등에 보면 CRYPT_ALGORITHMS_DEPRECATE=__unix__ , CRYPT_DEFAULT=6 를 써주는데, 적어주지 않아도 해당 설정은 LONG_PASSWORD=1 값만 가지고 적용이 된다.

- 참고
https://www.stigviewer.com/stig/hp-ux_smse/2014-02-28/finding/V-11947

 

The system must require that passwords contain a minimum of 14 characters.

Security Technical Implementation Guides (STIGs) that provides a methodology for standardized secure installation and maintenance of DOD IA and IA-enabled devices and systems.

www.stigviewer.com

http://www.hashbangsecurity.com/blog-1/a-tale-of-the-unix-crypt/hp-ux-11i-v3-11-31-and-earlier/

 

- HP-UX 11i v3 (11.31) and earlier

This is the personal home page of John Smith from Prattville, Alabama.

www.hashbangsecurity.com

http://sansmemoirs.blogspot.com/2013/06/hp-unix-8-letter-passwords-what-do-i.html

 

HP unix 8 letter password's, what do i need todo if i need more characters?

HP Unix 11.i3 1. Ensure, you have root password. 2. download the depot file from https://h20392.www2.hp.com/portal/swdepot/displayProduc...

sansmemoirs.blogspot.com

https://www.keysight.com/upload/cmc_upload/All/UsingSwinstall.pdf

불러오는 중입니다...

HP-UX LongPassword _ My HPE Software Center.pdf
0.11MB