htpasswd.html.ko.euc-kr 13.4 KB
Newer Older
powelld's avatar
powelld committed
<?xml version="1.0" encoding="EUC-KR"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head>
<meta content="text/html; charset=EUC-KR" http-equiv="Content-Type" />
<!--
        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
              This file is generated from xml source: DO NOT EDIT
        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
      -->
<title>htpasswd - basic authentication에 사용할 사용자파일을
      관리한다 - Apache HTTP Server Version 2.4</title>
<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
<script src="../style/scripts/prettify.min.js" type="text/javascript">
</script>

<link href="../images/favicon.ico" rel="shortcut icon" /></head>
<body id="manual-page"><div id="page-header">
<p class="menu"><a href="../mod/">모듈</a> | <a href="../mod/directives.html">지시어들</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">용어</a> | <a href="../sitemap.html">사이트맵</a></p>
<p class="apache">Apache HTTP Server Version 2.4</p>
<img alt="" src="../images/feather.png" /></div>
<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
<div id="path">
<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">Programs</a></div><div id="page-content"><div id="preamble"><h1>htpasswd - basic authentication에 사용할 사용자파일을
      관리한다</h1>
<div class="toplang">
<p><span>가능한 언어: </span><a href="../en/programs/htpasswd.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
<a href="../fr/programs/htpasswd.html" hreflang="fr" rel="alternate" title="Fran&#231;ais">&nbsp;fr&nbsp;</a> |
<a href="../ko/programs/htpasswd.html" title="Korean">&nbsp;ko&nbsp;</a> |
<a href="../tr/programs/htpasswd.html" hreflang="tr" rel="alternate" title="T&#252;rk&#231;e">&nbsp;tr&nbsp;</a></p>
</div>
<div class="outofdate">이 문서는 최신판 번역이 아닙니다.
            최근에 변경된 내용은 영어 문서를 참고하세요.</div>

    <p><code>htpasswd</code>는 HTTP basic authentication에 사용할
    사용자명과 암호를 저장하는 일반파일을 생성하고 수정한다.
    <code>htpasswd</code>가 파일을 쓰거나 읽을 수 없다면,
    오류상태를 반환하고 아무것도 수정하지 않는다.</p>

    <p>아파치 웹서버는 자원을 <code>htpasswd</code>로 만든 파일에
    기록한 사용자에게만 보여줄 수 있다. 이 프로그램은 사용자명과
    암호를 저장하는 일반 파일을 관리한다. 그러나 다른 자료저장
    방식을 위해 암호 정보를 암호화하여 저장할 수 있다. DBM
    데이터베이스를 사용하려면 <a href="dbmmanage.html">dbmmanage</a>를 참고하라.</p>

    <p><code>htpasswd</code>는 아파치 특유의 MD5 혹은 시스템의
    <code>crypt()</code>를 사용하여 암호를 암호화한다.
    <code>htpasswd</code>가 관리하는 파일은 두 종류의 암호를
    모두 저장할 수 있다. 즉, 같은 파일에 MD5로 암호화한 암호를
    사용하는 사용자와 <code>crypt()</code>로 암호화한 암호를
    사용하는 사용자 정보 모두 나올 수 있다.</p>

    <p>이 manpage는 명령행 옵션만을 설명한다. <a href="httpd.html">httpd</a>에서 사용자인증을 설정하는 지시어에
    대한 설명은 아파치 배포본에 포함되있고 <a href="http://httpd.apache.org">http://httpd.apache.org/</a>에서도
    볼 수 있는 아파치 설명서를 참고하라.</p>
</div>
<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#synopsis">개요</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#options">옵션</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#exit">종료코드</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#examples">예제</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#security">보안상 고려할 점</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#restrictions">제한</a></li>
</ul><h3>참고</h3><ul class="seealso"><li><a href="httpd.html">httpd</a></li><li>배포본에는 SHA1을 지원하는 스크립트도 있다.</li><li><a href="#comments_section">Comments</a></li></ul></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="synopsis" id="synopsis">개요</a></h2>
    <p><code><strong>htpasswd</strong>
    [ -<strong>c</strong> ]
    [ -<strong>m</strong> ]
    [ -<strong>D</strong> ] <var>passwdfile</var> <var>username</var></code></p>

    <p><code><strong>htpasswd</strong> -<strong>b</strong>
    [ -<strong>c</strong> ]
    [ -<strong>m</strong> |
      -<strong>d</strong> |
      -<strong>p</strong> |
      -<strong>s</strong> ] 
    [ -<strong>D</strong> ]  <var>passwdfile</var> <var>username</var>
    <var>password</var></code></p>

    <p><code><strong>htpasswd</strong> -<strong>n</strong>
    [ -<strong>m</strong> |
      -<strong>d</strong> |
      -<strong>s</strong> |
      -<strong>p</strong> ] <var>username</var></code></p>

    <p><code><strong>htpasswd</strong> -<strong>nb</strong>
    [ -<strong>m</strong> |
      -<strong>d</strong> |
      -<strong>s</strong> |
      -<strong>p</strong> ] <var>username</var> <var>password</var></code></p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="options" id="options">옵션</a></h2>
    <dl>
    <dt><code>-b</code></dt>
    <dd>배치(batch) 모드를 사용한다. <em>예를 들어</em>, 암호를
    물어보지않고 명령행에서 받는다. 명령행에 <strong>암호가
    직접 드러나므로</strong>, 이 옵션은 매우 조심해서 사용해야
    한다.</dd>

    <dt><code>-c</code></dt>
    <dd><var>passwdfile</var>을 만든다. <var>passwdfile</var>
    이미 존재한다면, 덮어쓴다. 이 옵션을 <code>-n</code> 옵션과
    같이 사용할 수 없다.</dd>

    <dt><code>-n</code></dt>
    <dd>파일을 수정하지않고 결과를 표준출력으로 출력한다.
    아파치가 문서이외의 곳에 생성한 암호를 저장할때 유용하다.
    (항상 첫번째 아규먼트인) <var>passwdfile</var> 아규먼트가
    없기때문에 명령행 문법이 다르다. <code>-c</code> 옵션과
    같이 사용할 수 없다.</dd>

    <dt><code>-m</code></dt>
    <dd>MD5를 사용하여 암호를 암호화한다. Windows, Netware,
    TPF에서 기본값이다.</dd>

    <dt><code>-d</code></dt>
    <dd><code>crypt()</code>를 사용하여 암호를 암호화한다.
    Windows, Netware, TPF를 제외한 모든 플래폼에서 기본값이다.
    모든 플래폼의 <code>htpasswd</code>가 이 형식을 지원할 수는
    있지만, Windows, Netware, TPF의 <a href="httpd.html">httpd</a>
    서버는 이 형식을 지원하지 않는다.</dd>

    <dt><code>-s</code></dt>
    <dd>암호를 SHA 암호화한다. LDAP 디렉토리교환형식(ldif)을
    사용하여 Netscape 서버로 정보를 보내거나 거져올때 유용하다.</dd>

    <dt><code>-p</code></dt>
    <dd>암호를 그대로 사용한다. 모든 플래폼의 <code>htpasswd</code>
    지원하지만, Windows, Netware, TPF의 <a href="httpd.html">httpd</a>
    데몬만이 일반 암호를 받는다.</dd>

    <dt><code>-D</code></dt>
    <dd>사용자를 삭제한다. htpasswd 파일에 사용자명이 있다면
    삭제한다.</dd>
    
    <dt><code><var>passwdfile</var></code></dt>
    <dd>사용자명과 암호를 저장하는 파일명. <code>-c</code>
    사용한 경우 파일이 없다면 새로 만들고, 있다면 덮어쓴다.</dd>

    <dt><code><var>username</var></code></dt>
    <dd><var>passwdfile</var>에 만들거나 수정할 사용자명.
    <var>username</var>이 이 파일에 없다면 항목을 추가한다.
    있다면 암호를 수정한다.</dd>

    <dt><code><var>password</var></code></dt>
    <dd>암호화하여 파일에 저장할 암호. 오직 <code>-b</code>
    옵션과 같이 사용할 수 있다.</dd>
    </dl>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="exit" id="exit">종료코드</a></h2>
    <p><code>htpasswd</code><var>passwdfile</var>에 사용자명과
    암호를 성공적으로 추가하거나 수정한 경우 ("참") 종료코드
    0을 반환한다. <code>htpasswd</code>는 파일에 접근할때 문제가
    발생한 경우 <code>1</code>을, 명령행 형식이 잘못된 경우
    <code>2</code>를, 입력한 암호와 확인차 다시 입력한 값이
    일치하지 않은 경우 <code>3</code>을, 명령이 중단된 경우
    <code>4</code>를, (사용자명, 파일명, 암호, 최종 계산결과)
    값이 너무 긴 경우 <code>5</code>를, 사용자명에 허용하지않는
    문자가 포함된 경우 <a href="#restrictions">제한 절</a> 참고)
    <code>6</code>를, 파일이 올바른 암호파일이 아닌 경우
    <code>7</code>을 반환한다.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="examples" id="examples">예제</a></h2>
    <div class="example"><p><code>
      htpasswd /usr/local/etc/apache/.htpasswd-users jsmith
    </code></p></div>

    <p>사용자 <code>jsmith</code>의 암호를 추가하거나 수정한다.
    사용자에게 암호를 물어본다. Windows 시스템에서 실행하면
    암호를 아파치 특유의 MD5 알고리즘을 사용하여 암호화하고,
    아니면 시스템의 <code>crypt()</code> 함수를 사용한다. 파일이
    없다면 <code>htpasswd</code>는 아무 일도 하지않고 오류를
    낸다.</p>

    <div class="example"><p><code>
      htpasswd -c /home/doe/public_html/.htpasswd jane
    </code></p></div>

    <p>새로 파일을 만들고 그 파일에 사용자 <code>jane</code>
    추가한다. 사용자에게 암호를 물어본다. 파일이 있지만 읽거나
    쓸 수 없다면, <code>htpasswd</code>는 파일을 수정하지않고
    문구를 출력한후 오류상태를 반환한다.</p>

    <div class="example"><p><code>
      htpasswd -mb /usr/web/.htpasswd-all jones Pwd4Steve
    </code></p></div>

    <p>명령행의 암호(<code>Pwd4Steve</code>)를 MD5 알고리즘으로
    암호화하여 지정한 파일에 저장한다.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="security" id="security">보안상 고려할 점</a></h2>
    <p><code>htpasswd</code> 등이 관리하는 웹 암호파일이 웹서버의
    URI 공간에 있으면 <em>안된다</em>. 즉, 브라우저가 이 파일을
    볼 수 없어야 한다.</p>

    <p>명령행에 암호화하지않은 암호를 사용하기때문에 <code>-b</code>
    옵션을 추천하지 않는다.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="restrictions" id="restrictions">제한</a></h2>
    <p>Windows와 MPE 플래폼은 <code>htpasswd</code>가 암호화하는
    암호의 길이를 <code>255</code> 문자로 제한한다. 더 긴 암호는
    255자에서 짤린다.</p>

    <p><code>htpasswd</code>가 사용하는 MD5 알고리즘은 아파치
    소프트웨어 특유의 것이다. 이를 사용하여 암호화한 암호를
    다른 웹서버에서 사용할 수 없다.</p>

    <p>사용자명은 <code>255</code> 바이트로 제한되고 <code>:</code>
    문자를 포함할 수 없다.</p>
</div></div>
<div class="bottomlang">
<p><span>가능한 언어: </span><a href="../en/programs/htpasswd.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
<a href="../fr/programs/htpasswd.html" hreflang="fr" rel="alternate" title="Fran&#231;ais">&nbsp;fr&nbsp;</a> |
<a href="../ko/programs/htpasswd.html" title="Korean">&nbsp;ko&nbsp;</a> |
<a href="../tr/programs/htpasswd.html" hreflang="tr" rel="alternate" title="T&#252;rk&#231;e">&nbsp;tr&nbsp;</a></p>
</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
<script type="text/javascript"><!--//--><![CDATA[//><!--
var comments_shortname = 'httpd';
var comments_identifier = 'http://httpd.apache.org/docs/2.4/programs/htpasswd.html';
(function(w, d) {
    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
        d.write('<div id="comments_thread"><\/div>');
        var s = d.createElement('script');
        s.type = 'text/javascript';
        s.async = true;
        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
    }
    else { 
        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
    }
})(window, document);
//--><!]]></script></div><div id="footer">
<p class="apache">Copyright 2017 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
<p class="menu"><a href="../mod/">모듈</a> | <a href="../mod/directives.html">지시어들</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">용어</a> | <a href="../sitemap.html">사이트맵</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
if (typeof(prettyPrint) !== 'undefined') {
    prettyPrint();
}
//--><!]]></script>
</body></html>