database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
ㆍPostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
PostgreSQL Q&A 4006 게시물 읽기
No. 4006
[감사] 답변 감사합니다. (간단하게 삽질기 적어봅니다.)
작성자
박종묵
작성일
2002-02-16 13:38
조회수
1,611

우선 정재익님께 감사하다는 말부터 합니다. _(__)_ 꾸벅

 

제익님 말대로 pg_hba.conf가 문제가 맞더군요.

 

파일을 살펴보니 주석빼면

 

local all peer sameuser

host all 127.0.0.1 255.0.0.0 ident sameuser

host all 0.0.0.0 0.0.0.0 reject

 

이렇게 세줄이였습니다.

 

문제는 저 "peer sameuser"더군요. 이것을 "password"로 수정하니

 

정상적으로 접속을 하더군요. ^^

 

저 peer라는 것 때문에 Peer authentication failed 이라는 에러가 나온것이더군요.

 

뭐 pg_ident.conf를 수정해서 권한을 줄수 있겠지만 귀찮아서 ^^;;;

 

아무튼 저런식으로 하니 되더군요.

 

아참 그리고 패스워드에 대한 암호화부분에 대해서도

 

postgresql이 지원하는 것 같더군요.

 

주석중에서

 

Authentication Types (AUTHTYPE)

-------------------------------

 

AUTHTYPE is a keyword indicating the method used to authenticate the

user, i.e. to determine that the user is authorized to connect under

the PostgreSQL username supplied in the connection request. A

different AUTHTYPE can be specified for each record in the file.

 

trust: No authentication is done. Trust that the user has the

authority to use whatever username he specifies.

 

password: Authentication is done by matching a password supplied

in clear by the host. If AUTH_ARGUMENT is specified then

the password is compared with the user's entry in that

file (in the $PGDATA directory). These per-host password

files can be maintained with the pg_passwd(1) utility.

If no AUTH_ARGUMENT appears then the password is compared

with the user's entry in the pg_shadow table.

 

crypt: Same as 'password', but authentication is done by

encrypting the password sent over the network.

 

ident: Authentication is done by the ident server on the remote

host, via the ident (RFC 1413) protocol. An AUTH_ARGUMENT

is required: it is a map name to be found in the

$PGDATA/pg_ident.conf file. The connection is accepted

if pg_ident.conf contains an entry for this map name with

the ident-supplied username and the requested PostgreSQL

username. The special map name "sameuser" indicates an

implied map (not sought in pg_ident.conf) that maps every

ident username to the identical PostgreSQL username.

 

peer: Authentication is done as for ident, but by obtaining user

identification from the Unix socket credentials. (This

service is only supported by a few operating systems. If

it is not usable in a particular implementation, use of

this method will cause an error.) Username mapping is

exactly the same as for ident.

 

krb4: Kerberos V4 authentication is used.

 

krb5: Kerberos V5 authentication is used.

 

reject: Reject the connection.

 

Local (UNIX socket) connections support only AUTHTYPEs "trust",

"password", "crypt", and "reject". If the operating system supplies

the necessary support, they also support "peer".

Host and hostssl connections support all AUTHTYPEs except "peer".

 

과 같은 얘기가 있더군요.

 

crypt 라는 인증옵션이 존제하는 것을 보면 패스워드 암호화에 대한것도

 

지원하는 것 같습니다.

 

더이상은 영어가 짧아서 ^^;;;

 

이상으로 저의 삽질기였습니다.

 

마지막으로 재익님께 정말로 감사드립니다.

이 글에 대한 댓글이 총 1건 있습니다.

종목님 이 부분 한번 정리해서 Tutorial 란에 올려 주는 것이 어떨까요. 개인적으로 예전 부터 한번 정리한다고 마음만 먹고 있는 것이 잘 되질 않아서 살짝이 미뤄 봅니다. 아는대까지만 적어도 다른 분들께 많은 도움이 될 것으로 생각합니다. :-)

 

그리고 crypt 로 설정을 하면 unix DES crypt 함수에 의한 암호 설정을 지원해 줍니다. 그런데 문제는 리눅스의 경우 MD5 를 사용한다는 것입니다. 이것을 정상적으로 처리를 못해 주더군요. 그런데 이번 PostgreSQL 7.2 에서는 정상적으로 처리 가능하다고 적혀 있으니 어쩌면 되지 않을까 생각해 봅니다.

 

어찌 되었던 정상적으로 해결하셨다니 다행이네요. :-)

정재익(advance)님이 2002-02-16 18:07에 작성한 댓글입니다.
[Top]
No.
제목
작성자
작성일
조회
4013[질문]7.2로 마이그레이션 data restore 문제
김선휴
2002-02-18
861
4015┕>Re: [질문]7.2로 마이그레이션 data restore 문제
정재익
2002-02-18 20:40:59
1144
4033 ┕>Re: Re: [질문]7.2로 마이그레이션 data restore 문제 [1]
김선휴
2002-02-20 19:22:16
1239
4012cgi 프로그램에서...Sorry..too many client...
별이반짝
2002-02-17
1093
4008실제 레퍼런스 사이트는 없는지요? [2]
배재한
2002-02-16
1346
4009┕>Re: 실제 레퍼런스 사이트는 없는지요?
김대성
2002-02-17 01:31:39
1338
4010 ┕>망설이는 이유...
배재한
2002-02-17 09:30:14
1185
4011  ┕>Re: 개인적인 생각
정재익
2002-02-17 12:10:27
1461
4006[감사] 답변 감사합니다. (간단하게 삽질기 적어봅니다.) [1]
박종묵
2002-02-16
1611
4003[질문] postgresql에서 사용자 패스워드 설정을 어떻게 적용하죠? [1]
박종묵
2002-02-15
1940
4001cgi에서의 연동
궁금
2002-02-15
1073
4005┕>Re: cgi에서의 연동
정재익
2002-02-16 00:10:55
1085
3999백업화일 복구후 데이터가 안나옵니다.. [2]
최우진
2002-02-15
1194
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.030초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다