Linux Shadow Password HOWTO <author>Michael H. Jackson, <tt>mhjack@tscnet.com</tt>. <date>v1.3, 3 April 1996 <trans>번역: 조용일, <htmlurl url="mailto:tolkien@nownuri.nowcom.co.kr"> <tdate>번역일: 1997년 2월 1일 <abstract> <!--% This document aims to describe how to obtain, install, and configure the Linux password <em>Shadow Suite</em>. It also discusses obtaining, and [re]installing other software and network daemons that require access to user passwords. This other software is not actually part of the Shadow Suite, but these programs will need to be recompiled to support the <em>Shadow Suite</em>. This document also contains a programming example for adding shadow support to a program. Answers to some of the more frequently asked questions are included near the end of this document. %--> 이 문서는 Linux Passwd <em>Shadow Suite</em>를 어떻게 얻고, 설치하고, 초기화하는 방법을 설명하고 있다. 또한 user password를 필요로 하는 network daemon이나 software를 얻고, 재설치하는 것도 다루고 있다. 그런 software는 <em>Shadow Suite</em>의 일부가 아니지만, Shadow Suite를 지원하도록 재 compile할 필요가 있다. 글중에는 program에 shadow를 지원하는 programming example도 있다. 자주 묻는 질문들에 대한 답이 글 말미에 있다. </abstract> <!-- Table of contents --> <toc> <!-- Begin the document --> <!--% <sect><heading>Introduction. %--> <sect><heading>들어가면서. <p> <!--% This is the Linux Shadow-Password-HOWTO. This document describes why and how to add shadow password support on a Linux system. Some examples of how to use some of the <em>Shadow Suite's</em> features is also included. %--> 이것은 Linux Shadow-Password-HOWTO이다. 이 글은 Linux system에서 shadow password가 왜 지원됐고, 어떤 식으로 지원하는지 기술하고 있다. <em>Shadow Suite</em>의 몇몇 기능을 어떻게 쓰는가에 대한 예제들도 포함하고 있다. <p> <!--% When installing the <em>Shadow Suite</em> and when using many of the utility programs, you must be logged in as <em>root</em>. When installing the <em>Shadow Suite</em> you will be making changes to system software, and it is highly recommended that you make backup copies of programs as indicated. I also recommend that you read and understand all the instructions before you begin. %--> <em>Shadow Suite</em>를 설치하고, 많은 utility들을 사용할 때, 반드시 root로 login해야 한다. <em>Shadow Suite</em>를 설치할 때, system software에 변화를 주어야 할 것이다. 그리고, 지시하는 대로 program의 backup 복사본을 만들어 놓기를 강력히 권고한다. 또한, 시작하기 전에 안내서를 읽고 이해하기를 권한다. <!--% <sect1><heading>Changes from the previous release. %--> <sect1><heading>이전 글과 다른 것들. <p> <!--% <verb>Additions: Added a sub-section on why you might not want to install shadow Added a sub-section on updating the xdm program Added a section on how to put Shadow Suite features to work Added a section containing frequently asked questions Corrections/Updates: Corrected html references on Sunsite Corrected section on wu-ftp to reflect adding -lshadow to the Makefile Corrected minor spelling and verbiage errors Changed section on wu-ftpd to support ELF Updated to reflect security problems in various login programs Updated to recommend the Linux Shadow Suite by Marek Michalkiewicz </verb> %--> <verb>덧 붙여진 것들: shadow를 왜 설치하지 원하지 않는 이유에 대한 sub-section xdm을 update하는 것에 대한 sub-section 작업에 Shadow Suite의 기능을 추가하는 방법에 대한 section 자주 묻는 질문에 대한 section 수정 및 update된 것들: Sunsite의 html 참조를 정정 Makefile에 -lshadow를 덧붙이도록 wu-ftp에 대한 section의 정정 철자와 수다스러움을 정정 ELF를 지원하도록 wu-ftpd에 대한 section 변경 여러가지 login program의 보안 문제를 반영하도록 update Marek Michalkiewicz의 Linux Shadow Suite를 권하도록 update </verb> <!--% <sect1><heading>New versions of this document. %--> <sect1><heading>이 문서의 최근 것은... <p> <!--% The latest released version of this document can always be retrieved by anonymous FTP from: %--> 이 문서의 최근판은 anonymous FTP인 <bf>sunsite.unc.edu</bf> <verb>/pub/Linux/docs/HOWTO/Shadow-Password-HOWTO</verb> <!--% or: %--> 또는: <verb>/pub/Linux/docs/HOWTO/other-formats/Shadow-Password-HOWTO{-html.tar,ps,dvi}.gz</verb> <!--% or via the World Wide Web from the <url url="http://sunsite.unc.edu/mdw/linux.html" name="Linux Documentation Project Web Server">, at page: <url url="http://sunsite.unc.edu/linux/HOWTO/Shadow-Password-HOWTO.html" name="Shadow-Password-HOWTO"> or directly from me, <tt><mhjack@tscnet.com></tt>. It will also be posted to the newsgroup: <tt>comp.os.linux.answers</tt> %--> 에 있으며, 또는 <url url="http://sunsite.unc.edu/mdw/linux.html" name="Linux Documentation Project Web Server">를 통해서, <url url="http://sunsite.unc.edu/linux/HOWTO/Shadow-Password-HOWTO.html" name="Shadow-Password-HOWTO">, 또는 나(<tt><mhjack@tscnet.com></tt>)에게 직접 얻을 수 있다. 이 것은 newsgroup: <tt>comp.os.linux.answers</tt>에 항상 게시된다. <p> <!--% This document is now packaged with the Shadow-YYDDMM packages. %--> 이 문서는 Shadow-YYDDMM package에 포함된다. <sect1><heading>Feedback. <p> <!--% Please send any comments, updates, or suggestions to me: <htmlurl url="mailto:mhjack@tscnet.com" name="Michael H. Jackson <mhjack@tscnet.com>"> The sooner I get feedback, the sooner I can update and correct this document. If you find any problems with it, please mail me directly as I very rarely stay up-to-date on the newsgroups. %--> 나(<htmlurl url="mailto:mhjack@tscnet.com" name="Michael H. Jackson <mhjack@tscnet.com>">)에게 어떤 의견, 새로운 것, 제안을 보내주기 바란다. 내가 빨리 그러한 것들을 받을수록, 이 문서를 빨리 최신 정보를 담고, 잘못을 바로 잡을 수 있다. 어떤 문제가 있을 경우에는 나에게 직접 전해주기 바란다. 왜냐하면 내가 newsgroup에 매일 올라가지 않기 때문이다. <!--% <sect><heading>Why shadow your passwd file? %--> <sect><heading>왜 passwd file을 숨겨야 하는가? <p> <!--% By default, most current Linux distributions do not contain the <em>Shadow Suite</em> installed. This includes Slackware 2.3, Slackware 3.0, and other popular distributions. One of the reasons for this is that the copyright notices in the original <em>Shadow Suite</em> were not clear on redistribution if a fee was charged. Linux uses a GNU Copyright (sometimes refereed to as a Copyleft) that allows people to package it into a convenient package (like a CD-ROM distribution) and charge a fee for it. %--> 기본적으로, 대부분의 Linux 배포본들은 준비된 <em>Shadow Suite</em>를 포함하지 않는다. Slackware 2.3, Slackware 3.0, 다른 잘 알려진 배포본들이 그러하다. 이렇게 하는 이유중 하나는 원래의 <em>Shadow Suite</em>가 돈을 받고 재배포할 경우에 대한 저작권이 명확하지 않기 때문이다. Linux는 사용하기 편하게 포장(CD-ROM 배포처럼)한 뒤, 그에 대한 댓가로 돈을 받는 것을 허용하는 GNU의 저작권(Copyleft라고 불리우기도 한다)를 사용한다. <p> <!--% The current maintainer of the <em>Shadow Suite</em>, <htmlurl url="mailto:marekm@i17linuxb.ists.pwr.wroc.pl" name="Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl>"> received the source code from the original author under a BSD style copyright that allowed redistribution. Now that the copyright issues are resolved, it is expected that future distributions will contain password shadowing by default. Until then, you will need to install it yourself. %--> 지금 <em>Shadow Suite</em>를 관리하는 <htmlurl url="mailto:marekm@i17linuxb.ists.pwr.wroc.pl" name="Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl>">씨는 재배포를 허용하는 BSD의 저작권을 따르는 저자로부터 source code를 받았다. 따라서, 지금은 저작권 문제는 해결되어서, 이후에 나오는 배포본에는 password에 shadow가 기본으로 사용될 수 있을 것이다. 그때까지는 당신 스스로 설치해야 된다. <p> <!--% If you installed your distribution from a CD-ROM, you may find that, even though the distribution did not have the <em>Shadow Suite</em> installed, some of the files you need to install the <em>Shadow Suite</em> may be on the CD-ROM. %--> CD-ROM으로부터 배포본을 설치했다면, 비록 배포본이 <em>Shadow Suite</em>를 설치하지 않았더라도, CD-ROM에서 <em>Shadow Suite</em>를 원하는 몇몇 file들이 있을 것이다. <p> <!--% <em>However, Shadow Suite versions 3.3.1, 3.3.1-2, and shadow-mk all have security problems with their login program and several other <em>suid root</em> programs that came with them, and should no longer be used.</em> %--> <em>어쨌든, Shadow Suite 3.3.1, 3.3.1-2, shadow-mk는 login program과 <em>suid root</em>를 쓰는 program에 보안 허점이 있고, 더 이상 쓰지 말아야 한다.</em> <p> <!--% All of the necessary files may be obtained via anonymous FTP or through the World Wide Web. %--> 모든 필요한 file들은 anonymous FTP나 WWW을 통해서 얻을 수 있다. <p> <!--% On a Linux system without the <em>Shadow Suite</em> installed, user information including passwords is stored in the <tt>/etc/passwd</tt> file. The password is stored in an <em>encrypted</em> format. If you ask a cryptography expert, however, he or she will tell you that the password is actually in an <em>encoded</em> rather than <em>encrypted</em> format because when using crypt(3), the text is set to null and the password is the key. Therefore, from here on, I will use the term <em>encoded</em> in this document. %--> <em>Shadow Suite</em>를 깔지 않은 Linux system에서는, password를 포함한 사용자 정보는 <tt>/etc/passwd</tt>에 보관되어 있다. password는 <em>암호화되어서 (encrypted)</em> 저장된다. 만일 암호학의 전문가에게 묻는다면, 그는 password는 <em>encrypt</em>된 형식이라기 보다는 <em>encode</em>된 형식으로 되어 있다. 이유는 crypt(3)을 적용할 때, text는 null로 하고 password를 key로 사용하기 때문이라고 한다. 따라서 이 문서에서는 <em>encode된</em>이라는 말을 쓸 것이다. (역자주 : 사전에는 encode와 encrypt를 같은 뜻으로 사용하고 있읍니다. - 암호로 바꿔쓰다 - 라는 뜻입니다만, 암호학을 전공하신 분들에게는 뉘앙스가 다를 것같습니다. 이에 대한 보충 바랍니다.) <p> <!--% The algorithm used to encode the password field is technically referred to as a <em>one way hash function</em>. This is an algorithm that is easy to compute in one direction, but very difficult to calculate in the reverse direction. More about the actual algorithm used can be found in section 2.4 or your crypt(3) manual page. %--> password를 encode하는 데 사용되는 algorithm은 기술적으로는 <em>단방향 hash function</em>과 같은 방법으로 간주되고 있다. 이 것은 순방향으로는 계산하기 편하게 되어 있지만 역방향은 연산이 매우 힘들게 되어 있다. 사용된 algorithm에 대한 자세한 설명은 section 2.4나 crypt(3) manual page에 있다. <p> <!--% When a user picks or is assigned a password, it is encoded with a randomly generated value called the <em>salt</em>. This means that any particular password could be stored in 4096 different ways. The <em>salt</em> value is then stored with the encoded password. %--> 사용자가 password를 선택하거나 할당받을 때, password는 <em>salt</em>(소금?)라고 불리는 무작위로 생성된 값과 같이 encode된다. 이것은 어떤 password든지 4096가지의 다른 방법으로 저장될 수 있다라는 얘기다. <em>salt</em> 값은 encode된 password와 같이 저장된다. <p> <!--% When a user logs in and supplies a password, the <em>salt</em> is first retrieved from the stored encoded password. Then the supplied password is <em>encoded</em> with the <em>salt</em> value, and then compared with the <em>encoded</em> password. If there is a match, then the user is authenticated. %--> 사용자가 login하고 password를 사용하면, <em>salt</em>는 encode되어 저장된 password에서 뽑혀져 나온다. 그다음 입력된 password와 <em>salt</em>가 같이 <em>encode</em>된다. 그리고, <em>encode되어</em> 저장된 password와 비교한다. 그 결과, 서로 같다면 사용자는 인증된다. <p> <!--% It is computationally difficult (but not impossible) to take a randomly <em>encoded</em> password and recover the original password. However, on any system with more than just a few users, at least some of the passwords will be common words (or simple variations of common words). %--> 무질서하게 <em>encode된</em> password를 획득해서 원래의 password로 되돌리는 것은 계산상으로는 힘들다(그러나 불가능하지는 않다). 그러나, 적지 않은 사용자가 사용하는 system이라면, 적어도 몇몇 password는 일상단어로 이루어져 있다 (또는 간단한 변종이다). <p> <!--% System crackers know all this, and will simply encrypt a dictionary of words and common passwords using all possible 4096 <em>salt</em> values. Then they will compare the encoded passwords in your <tt>/etc/passwd</tt> file with their database. Once they have found a match, they have the password for another account. This is referred to as a <em>dictionary attack</em>, and is one of the most common methods for gaining or expanding unauthorized access to a system. %--> system cracker들는 이런 것을 알고, 자주 쓰이는 password들과 단어의 사전과 가능한 4096가지 <em>salt</em> 값을 사용해서 encrypt을 행할 것이다. 그다음에 그들은 그들의 database에 있는 당신의 <tt>/etc/passwd</tt> file의 encode된 password와 비교할 것이다. 일단 하나라도 일치한다면 그들은 또다른 계정의 password를 가지게 되는 셈이다. 이는 <em>dictionary attack</em>(사전 공격?)이라 고 불리우고, system에 허가되지 않은 접속을 얻을 때 쓰는 가장 보편적인 방법중 하나이다. <p> <!--% If you think about it, an 8 character password encodes to 4096 * 13 character strings. So a dictionary of say 400,000 common words, names, passwords, and simple variations would easily fit on a 4GB hard drive. The attacker need only sort them, and then check for matches. Since a 4GB hard drive can be had for under $1000.00, this is well within the means of most system crackers. %--> 생각해보라, 8문자된 password가 4096 * 13문자열로 encode된다. 그리고, 400,000개의 일반 단어, 이름, password, 약간의 변형들로 이루어진 사전은 4G Byte hard를 쉽게 채울 것이다. 공격자들은 이런 종류의 것이 필요하고, 맞는 지 검사해 볼 필요가 있다. 만일 10000 달러이하로 이런 4G byte짜리 hard를 가질 수 있다면, 대부분의 system cracker들에게는 충분하다. <p> <!--% Also, if a cracker obtains your <tt>/etc/passwd</tt> file first, they only need to encode the dictionary with the <tt>salt</tt> values actually contained in your <tt>/etc/passwd</tt> file. This method is usable by your average teenager with a couple of hundred spare Megabytes and a 486 class computer. %--> 또한, cracker가 당신의 <tt>/etc/passwd</tt> file을 이미 가지고 있다면, 그들은 <tt>/etc/passwd</tt> file에 포함되어 있는 <tt>salt</tt> 값만 가지고 사전을 encode하면 된다. 이 방법은 200 Megabyte의 공간과 486급 computer를 가지고 있는 보통 청소년이면 이용할 수 있다. <p> <!--% Even without lots of drive space, utilities like crack(1) can usually break at least a couple of passwords on a system with enough users (assuming the users of the system are allowed to pick their own passwords). %--> 심지어 많은 공간없이, crack(1)과 같은 utility들은 최소한 충분히 많은 사용자를 확보하고 있는 system의 password를 2개정도는 깰 수 있다 (user가 자기 자신의 password를 고를 수 있는 system이라고 한다면). <p> <!--% The <tt>/etc/passwd</tt> file also contains information like user ID's and group ID's that are used by many system programs. Therefore, the <tt>/etc/passwd</tt> file <em>must</em> remain world readable. If you were to change the <tt>/etc/passwd</tt> file so that nobody can read it, the first thing that you would notice is that the <tt>ls -l</tt> command now displays user ID's instead of names! %--> <tt>/etc/passwd</tt> file은 user ID와 group ID와 같은 대부분의 system program에서 쓰는 정보를 가지고 있다. 게다가 <tt>/etc/passwd</tt> file은 "모두 읽기 가능"으로 남아 <em>있어야 한다</em>. <tt>/etc/passwd</tt> file을 아무도 보지 못하게 하면, 제일 먼저 <tt>ls -l</tt> 명령이 이제 user 이름대신 user ID를 출력하는 것을 보게 될 것이다! <p> <!--% The <em>Shadow Suite</em> solves the problem by relocating the passwords to another file (usually <tt>/etc/shadow</tt>). The <tt>/etc/shadow</tt> file is set so that it cannot be read by just anyone. Only <em>root</em> will be able to read and write to the <tt>/etc/shadow</tt> file. Some programs (like xlock) don't need to be able to change passwords, they only need to be able to verify them. These programs can either be run <em>suid root</em> or you can set up a group <em>shadow</em> that is allowed read only access to the <tt>/etc/shadow</tt> file. Then the program can be run <em>sgid shadow</em>. %--> <em>Shadow Suite</em>는 password를 다른 file(대개 <tt>/etc/shadow</tt>)에 위치시킴으로써 이 문제를 해결한다. <tt>/etc/shadow</tt> file은 어느 누구도 볼 수 없도록 되어 있다. <em>root</em>만이 <tt>/etc/shadow</tt>를 볼 수 있고, 쓸 수 있다. 어떤 program (xlock 같은)은 password를 바꿀 수 있는 권리를 원하지 않는다. password를 확인할 수 있으면 된다. 이런 program들은 <em>suid root</em>로 실행되거나, <tt>/etc/shadow</tt>를 읽기만 할 수 있는 <em>shadow</em>로 group을 바꾸어 주면 된다. 그러면 program은 <em>sgid shadow</em>로 실행시킬 수 있다. <p> <!--% By moving the passwords to the <tt>/etc/shadow</tt> file, we are effectively keeping the attacker from having access to the encoded passwords with which to perform a <em>dictionary attack</em>. %--> password를 <tt>/etc/shadow</tt> file로 옮겨 줌으로써, <em>dictionary attack</em>를 하기 위해서 encode된 password들에 접근하는 공격자들은 효과적으로 방해할 수 있다. <p> <!--% Additionally, the <em>Shadow Suite</em> adds lots of other nice features: <itemize> <item>A configuration file to set login defaults (<tt>/etc/login.defs</tt>) <item>Utilities for adding, modifying, and deleting user accounts and groups <item>Password aging and expiration <item>Account expiration and locking <item>Shadowed group passwords (optional) <item>Double length passwords (16 character passwords) [NOT RECOMMENDED] <item>Better control over user's password selection <item>Dial-up passwords <item>Secondary authentication programs [NOT RECOMMENDED] </itemize> %--> 추가적으로 <em>Shadow Suite</em>는 몇가지 괜찮은 기능을 더 가지고 있다: <itemize> <item>login 기본사항(<tt>/etc/login.defs</tt>)들이 준비된 configuration file <item>user 계정 및 group을 추가, 수정, 삭제하는 utility들 <item>password의 유효기간 설정과 경과후 취소 <item>계정 무효와 동결 <item>group password들의 shadow (선택사항) <item>2배 길이를 가지는 passwrd (16문자 password) (권하지 않음) <item>user가 password를 고를 때, 적절한 통제 <item>전화접속용 password <item>보조 인증 program (권하지 않음) </itemize> <p> <!--% Installing the <em>Shadow Suite</em> contributes toward a more secure system, but there are many other things that can also be done to improve the security of a Linux system, and there will eventually be a series of Linux Security HOWTO's that will discuss other security measures and related issues. %--> <em>Shadow Suite</em>를 설치하는 것은 좀 더 보안이 강화된 system으로 만들어 준다. 그러나, Linux system의 보안을 강화시켜주는 다른 많은 것들이 있고, 따라서 궁극적으로 다른 보안 도구나 관련된 사안을 다루는 Linux Security HOWTO series가 생길 것이다. <p> <!--% For current information on other Linux security issues, including warnings on known vulnerabilities see the <url url="http://bach.cis.temple.edu/linux/linux-security/" name="Linux Security home page."> %--> 알려진 취약점을 포함한 Linux 보안 문제에 대한 정보를 얻으려면 <url url="http://bach.cis.temple.edu/linux/linux-security/" name="Linux Security home page">를 방문하기 바란다. <!--% <sect1><heading>Why you might NOT want to shadow your passwd file. %--> <sect1><heading>passwd file을 은폐하기를 주저합니까? <p> <!--% There are a few circumstances and configurations in which installing the <em>Shadow Suite</em> would <em>NOT</em> be a good idea: <itemize> <item>The machine does not contain user accounts. <item>Your machine is running on a LAN and is using NIS (Network Information Services) to get or supply user names and passwords to other machines on the network. (This can actually be done, but is beyond the scope of this document, and really won't increase security much anyway) <item>Your machine is being used by terminal servers to verify users via NFS (Network File System), NIS, or some other method. <item>Your machine runs other software that validates users, and there is no shadow version available, and you don't have the source code. </itemize> %--> 다음과 같은 환경들에서는, <em>Shadow Suite</em>가 좋은 대안이 될 수 <em>없다</em>: <itemize> <item>system이 사용자 계정을 가지고 있지 않다. <item>당신의 system이 LAN위에서 운영되고 있고, network상의 다른 기계에 사용자 이름과 password를 얻기 위해서 NIS(Network Information Services)를 사용한다. (이 것만으로 잘 운영되고 있고, - 그 이상은 이 문서의 범위를 넘는다 - 보안을 그다지 많이 강화시키기를 원하지 않는다.) <item>당신의 기계가 NFS(Network File System), NIS 또는 다른 방법을 통해 사용자를 확인하기 위한 terminal server로 사용되고 있다. <item>사용자를 확인하는 다른 software를 사용하고 있고, 쓸 수 있는 shadow version이 없다. 그리고, source code도 갖고 있지 않다. </itemize> <!--% <sect1><heading>Format of the /etc/passwd file %--> <sect1><heading>/etc/passwd file의 형식 <p> <!--% A non-shadowed <tt>/etc/passwd</tt> file has the following format: <tscreen><verb>username:passwd:UID:GID:full_name:directory:shell</verb></tscreen> Where: <descrip> <tag/<tt>username</tt></tag> The user (login) name <tag/<tt>passwd</tt></tag> The encoded password <tag/<tt>UID</tt></tag> Numerical user ID <tag/<tt>GID</tt></tag> Numerical default group ID <tag/<tt>full_name</tt></tag> The user's full name - Actually this field is called the GECOS (General Electric Comprehensive Operating System) field and can store information other than just the full name. The Shadow commands and manual pages refer to this field as the comment field. <tag/<tt>directory</tt></tag> User's home directory (Full pathname) <tag/<tt>shell</tt></tag> User's login shell (Full Pathname) </descrip> %--> shadow의 세례를 받지 않은 <tt>/etc/passwd</tt> file은 다음과 같이 구성되어 있다. <tscreen><verb>username:passwd:UID:GID:full_name:directory:shell</verb></tscreen> <!--% Where: %--> 각요소는: <descrip> <tag/<tt>username</tt></tag> 사용자 (login) 이름 <tag/<tt>passwd</tt></tag> encode된 password <tag/<tt>UID</tt></tag> 숫자로 된 user ID <tag/<tt>GID</tt></tag> 숫자로 된 기본 group ID <tag/<tt>full_name</tt></tag> user의 실제 이름 - 실지로 이 field는 GECOS (General Electric Comprehensive Operating System: 일반 전자적 종합 운영 체계?) field라고 불리우며, 단지 실제 이름보다는 다른 정보를 가질 수 있다. Shadow 명령들과 manual page는 이 field를 comment로 다룬다. <tag/<tt>directory</tt></tag> 사용자의 home directory (Full pathname) <tag/<tt>shell</tt></tag> 사용자의 login shell (Full pathname) </descrip> <!--% For example: <tscreen><verb>username:Npge08pfz4wuk:503:100:Full Name:/home/username:/bin/sh</verb></tscreen> Where <tt>Np</tt> is the salt and <tt>ge08pfz4wuk</tt> is the <em>encoded</em> password. The encoded salt/password could just as easily have been <tt>kbeMVnZM0oL7I</tt> and the two are exactly the same password. There are 4096 possible encodings for the same password. (The example password in this case is 'password', a really <em>bad</em> password). %--> 예를 들면: <tscreen><verb>username:Npge08pfz4wuk:503:100:Full Name:/home/username:/bin/sh</verb></tscreen> <tt>Np</tt>는 salt이며, <tt>ge08pfz4wuk</tt>는 <em>encode된</em> password이다. encode된 salt/password는 <tt>kbeMVnZM0oL7I</tt>가 될 수도 있고, 둘은 같은 password를 가리킨다. 같은 password에 대해서 4096개의 다른 encoding이 존재할 수 있다. (예를 든 password는 'password'이며, 상당히 <em>나쁜</em> password이다). <p> <!--% Once the shadow suite is installed, the <tt>/etc/passwd</tt> file would instead contain: <tscreen><verb>username:x:503:100:Full Name:/home/username:/bin/sh</verb></tscreen> The <tt>x</tt> in the second field in this case is now just a place holder. The format of the <tt>/etc/passwd</tt> file really didn't change, it just no longer contains the <em>encoded</em> password. This means that any program that reads the <tt>/etc/passwd</tt> file but does not actually need to verify passwords will still operate correctly. %--> shadow suite가 설치되면, <tt>/etc/passwd</tt> file은 다음처럼 바뀐다: <tscreen><verb>username:x:503:100:Full Name:/home/username:/bin/sh</verb></tscreen> 두번째 field의 <tt>x</tt>는 아무 것도 아니다. (공간만 차지하고 있을 뿐이다.) <tt>/etc/passwd</tt> file의 형식은 전혀 바뀌지 않았다. 단지 <em>encode된</em> password를 포함하지 않을 뿐이다. 이는 <tt>/etc/passwd</tt> file을 읽기만 할 뿐 password를 검사하지 않은 program은 아무 이상없이 돌아간다는 것을 의미한다. <p> <!--% The passwords are now relocated to the shadow file (usually <tt>/etc/shadow</tt> file). %--> 이제 password가 shadow file(대부분 <tt>/etc/shadow</tt> file)로 재배치된다. <!--% <sect1><heading>Format of the shadow file %--> <sect1><heading>shadow file의 형식 <p> <!--% The <tt>/etc/shadow</tt> file contains the following information: <tscreen><verb>username:passwd:last:may:must:warn:expire:disable:reserved</verb></tscreen> Where: <descrip> <tag/<tt>username</tt></tag> The User Name <tag/<tt>passwd</tt></tag> The Encoded password <tag/<tt>last</tt></tag> Days since Jan 1, 1970 that password was last changed <tag/<tt>may</tt></tag> Days before password may be changed <tag/<tt>must</tt></tag> Days after which password must be changed <tag/<tt>warn</tt></tag> Days before password is to expire that user is warned <tag/<tt>expire</tt></tag> Days after password expires that account is disabled <tag/<tt>disable</tt></tag> Days since Jan 1, 1970 that account is disabled <tag/<tt>reserved</tt></tag> A reserved field </descrip> The previous example might then be: <tscreen><verb>username:Npge08pfz4wuk:9479:0:10000::::</verb></tscreen> %--> <tt>/etc/shadow</tt> file은 다음과 같은 정보를 갖고 있다: <tscreen><verb>username:passwd:last:may:must:warn:expire:disable:reserved</verb></tscreen> <!--% Where: %--> 각 요소는: <descrip> <tag/<tt>username</tt></tag> 사용자 이름 <tag/<tt>passwd</tt></tag> encode된 password <tag/<tt>last</tt></tag> 최근의 password를 바꾼 날 (1970, 1, 1일부터 계산한 날수) <tag/<tt>may</tt></tag> password를 바꾼 다음, 또 바꾸기 위해 기다리는 날수 (다음 password로의 변경 유예기간) <tag/<tt>must</tt></tag> 다음 password로 바꿀어야 할 때까지의 기간 (현 password 유효기간) <tag/<tt>warn</tt></tag> password가 만료되기 전에 user에게 바꿀 것을 경고하는 기간 <tag/<tt>expire</tt></tag> password가 만료된 뒤, user 계정 사용이 불가능하기까지 기간 <tag/<tt>disable</tt></tag> 계정이 사용 불가능하게 된 날(1970, 1, 1일부터 계산한 날수) <tag/<tt>reserved</tt></tag> 남겨둠 </descrip> 전의 예제 경우 다음과 같다: <tscreen><verb>username:Npge08pfz4wuk:9479:0:10000::::</verb></tscreen> <!--% <sect1><heading>Review of crypt(3). %--> <sect1><heading>crypt(3)에 대해서. <p> <!--% From the crypt(3) manual page: %--> crypt(3) manual 페이지에 의하면: <p> <!--% &dquot;<em>crypt</em> is the password encryption function. It is based on the <em>Data Encryption Standard</em> algorithm with variations intended (among other things) to discourage use of hardware implementations of a key search. %--> &dquot;<em>crypt</em>는 password를 encrypt하는 함수이다. 이는 <em> Data Encryption Standard</em> algorithm를 기반으로, (무엇보다) key를 찾는 기계적인 방법이 이용되기 힘들도록 약간의 변형이 가해져 있다. <p> <!--% [The] key is a user's typed password. [The encoded string is all NULLs] %--> key는 사용자가 입력한 password이다. [encode되는 string을 전부 NULL이다.] <p> <!--% [The] <em>salt</em> is a two-character string chosen from the set [a-zA-Z0-9./]. This string is used to perturb the algorithm in one of 4096 different ways. %--> <em>salt</em>은 [a-zA-Z0-9./]로 이루어진 집합으로부터 고른 두문자로 이루어진 문자열이다. 이 문자열은 4096개 경우중의 하나로 algorithm이 혼란스럽게 보이려는 목적으로 쓰인다. <p> <!--% By taking the lowest 7 bit[s] of each character of the key, a 56-bit key is obtained. This 56-bit key is used to encrypt repeatedly a constant string (usually a string consisting of all zeros). The returned value points to the encrypted password, a series of 13 printable ASCII characters (the first two characters represent the salt itself). The return value points to static data whose content is overwritten by each call. %--> key의 각 문자의 하위 7 bit을 취함으로써, 56-bit key가 주어진다. 이 56-bit key는 일정한 문자열을, 반복해서 encrypt하는 데 쓰인다. 결과는 13개 ASCII 문자열로, encrypt된 password를 가리킨다 (처음 두개 문자는 salt 그 자신이다). 결과값은 매번 호출될 때마다 다시 쓰이는 고정된 data를 가리킨다. <p> <!--% <bf>Warning:</bf> The key space consists of 2**56 equal 7.2e16 possible values. Exhaustive searches of this key space <bf>are possible</bf> using massively parallel computers. Software, such as <tt>crack(1)</tt>, is available which will search the portion of this key space that is generally used by humans for passwords. Hence, password selection should, at minimum, avoid common words and names. The use of a <tt>passwd(1)</tt> program that checks for crackable passwords during the selection process is recommended. %--> <bf>경고:</bf> key space는 2**56, 즉 7.2e16 가능한 값으로 이루어져 있다. key space를 샅샅이 뒤지는 것은 거대한 병렬 computer를 사용하면 <bf>가능할 것이다</bf>. <tt>crack(1)</tt>와 같은, 대부분의 사람들이 password로 삼는 key space의 특정 부분을 찾는 software가 있다. 따라서, 최소한 password를 선택할 때, 자주 쓰이는 단어나 이름은 피하기 바란다. <tt>passwd</tt> program을 사용하여, 찾기 쉬운 password를 선택하는 지 검사하기를 바란다. <p> <!--% The DES algorithm itself has a few quirks which make the use of the <tt>crypt(3)</tt> interface a very poor choice for anything other than password authentication. If you are planning on using the <tt>crypt(3)</tt> interface for a cryptography project, don't do it: get a good book on encryption and one of the widely available DES libraries.&dquot; %--> DES algorithm, 그 자체는 가끔 <tt>crypt(3)</tt> interface를 사용하는 것이 다른 password 인증을 위한 어떤 것보다 더 나쁜 선택으로 만들어 버리는 경향이 있다. 보안 강화를 위해서 <tt>crypt(3)</tt>를 사용하려고 한다면, DES만 사용하지 마라: encryption에 대한 좋은 책과 널리 쓰이는 DES library들을 구하라.&dquot; <p> (역자주 : 원문은 The DES algorithm itself has a few quirks which make the use of the <tt>crypt(3)</tt> interface a very poor choice for anything other than password authentication. If you are planning on using the <tt>crypt(3)</tt> interface for a cryptography project, don't do it: get a good book on encryption and one of the widely available DES libraries.&dquot; 입니다. 그중에서 don't do it: get ...부분이 매우 애매합니다. it이 무얼 가리키는 건지 명확하지 않습니다. 일단, get ...을 권유하는 것으로 추측하고 번역을 했는 데...) <p> <!--% Most <em>Shadow Suites</em> contain code for doubling the length of the password to 16 characters. Experts in <tt>des</tt> recommend against this, as the encoding is simply applied first to the left half and then to the right half of the longer password. Because of the way <tt>crypt</tt> works, this may make for a <em>less</em> secure encoded password then if double length passwords were not used in the first place. Additionally, it is less likely that a user will be able to remember a 16 character password. %--> 대부분 <em>Shadow Suite</em>들은 password의 길이를 16문자로 늘이는 code를 포함한다. <tt>des</tt>의 전문가들은 이를 권하지는 않는다. 왜냐하면 전반부를 encoding한 뒤, 긴 password의 후반부를 encoding하는 단순한 방법이기 때문이다. <tt>crypt</tt>의 방식대로라면, 긴 password를 사용하지 않는 것보다 <em>더 취약한</em> password를 만들 수 있다. 더우기, 사용자가 16문자나 되는 password를 기억하기 힘들다는 측면도 있다. <p> <!--% There is development work under way that would allow the authentication algorithm to be replaced with something more secure and with support for longer passwords (specifically the MD5 algorithm) and retain compatibility with the <tt>crypt</tt> method. %--> <tt>crypt</tt> 방법과 호환성을 지니면서, 긴 password를 지원하고 더 강화된 인증(특히, MD5 algorithm)을 할 수 있는 방법이 연구중이다. <p> <!--% If you are looking for a good book on encryption, I recommend: %--> encryption에 대한 책으로 다음을 권한다: <verb> "Applied Cryptography: Protocols, Algorithms, and Source Code in C" by Bruce Schneier <schneier@chinet.com> ISBN: 0-471-59756-2 </verb> <!--% <sect><heading>Getting the Shadow Suite. %--> <sect><heading>Shadow Suite 얻기. <!--% <sect1><heading>History of the Shadow Suite for Linux %--> <sect1><heading>Linux용 Shadow Suite의 역사 <p> <!--% <em>DO NOT USE THE PACKAGES IN THIS SECTION, THEY HAVE SECURITY PROBLEMS</em> %--> <em>이 SECTION에서 소개하는 PACKAGE를 사용하지 말라. 문제점이 발견되었다</em> <p> <!--% The original <em>Shadow Suite</em> was written by <tt>John F. Haugh II</tt>. %--> 최초로 <em>Shadow Suite</em>를 만든 사람은 <tt>John F. Haugh II</tt>이다. <p> <!--% There are several versions that have been used on Linux systems: <itemize> <item><tt>shadow-3.3.1</tt> is the original. <item><tt>shadow-3.3.1-2</tt> is Linux specific patch made by <htmlurl url="mailto:flla@stud.uni-sb.de" name="Florian La Roche <flla@stud.uni-sb.de>"> and contains some further enhancements. <item><tt>shadow-mk</tt> was specifically packaged for Linux. </itemize> %--> Linux system에서 사용되는 것으로는 다음과 같은 것들이 있다. <itemize> <item><tt>shadow-3.3.1</tt>가 원본이다. <item><tt>shadow-3.3.1-2</tt>는 <htmlurl url="mailto:flla@stud.uni-sb.de" name="Florian La Roche <flla@stud.uni-sb.de>">씨에 의해서 Linux에 맞게 고쳐졌고, 좀 더 나아진 것이 있다. <item><tt>shadow-mk</tt>는 Linux에 맞추어 구성되어 있다. </itemize> <p> <!--% The <tt>shadow-mk</tt> package contains the <tt>shadow-3.3.1</tt> package distributed by <tt>John F. Haugh II</tt> with the <tt>shadow-3.3.1-2 patch</tt> installed, a few fixes made by <htmlurl url="mailto:magnus@texas.net" name="Mohan Kokal <magnus@texas.net>"> that make installation a lot easier, a patch by <tt>Joseph R.M. Zbiciak</tt> for <tt>login1.c</tt> (login.secure) that eliminates the -f, -h security holes in /bin/login, and some other miscellaneous patches. %--> <tt>shadow-mk</tt> package는 <tt>shadow-3.3.1-2 patch</tt>가 적용된, <tt>John F. Haugh II</tt>씨에 의해 배포된 <tt>shadow-3.3.1</tt> package를 포함하고 있다. 거기에 좀 더 설치가 쉽게 <htmlurl url="mailto:magnus@texas.net" name="Mohan Kokal <magnus@texas.net>">씨께서 조금 고치고, <tt>Joseph R.M. Zbiciak</tt>씨께서 /bin/login의 -f, -h 보안 구멍을 제거한 <tt>login1.c</tt> (login.secure)가 덧 붙여지고, 몇몇 다른 잡다한 patch가 적용되어 있다. <p> <!--% The <tt>shadow.mk</tt> package was the <em>previously</em> recommended package, but should be replaced due to a <em>security problem</em> with the <tt>login</tt> program. %--> <tt>shadow.mk</tt> package는 현재 <tt>login</tt> program에 <em>보안상 허점</em>가 있어 조만간 대체될 것이다. <p> <!--% There are <em>security problems</em> with Shadow versions 3.3.1, 3.3.1-2, and shadow-mk involving the <tt>login</tt> program. This <tt>login</tt> bug involves not checking the length of a login name. This causes the buffer to overflow causing crashes or worse. It has been rumored that this buffer overflow can allow someone with an account on the system to use this bug and the shared libraries to gain <em>root</em> access. I won't discuss exactly how this is possible because there are a lot of Linux systems that are affected, but systems with these <em>Shadow Suites</em> installed, and most pre-ELF distributions <em>without</em> the <em>Shadow Suite</em> are vulnerable! %--> Shadow 3.3.1, 3.3.1-2, shadow-mk는 <tt>login</tt> program에 <em>보안상 허점</em>이 있다. 이 <tt>login</tt> bug는 login name의 길이를 검사하지 않는 것을 포함하고 있다. 이 것은 충돌 또는 더 나쁜 것을 유발시키는 buffer overflow를 발생시킨다. 이 buffer overflow가, 이 bug와 함께 shared library를 사용하는 system에서 어떤 사용자에게 <em>root</em> 권한을 준다는 소문이 있어 왔다. 나는 어떻게 이런 일이 가능한지 구체적으로 거론하지 않겠다. 그 이유는 이런 (bug가 있는) <em>Shadow Suite</em>를 설치해서 피해를 입을 수 있는 Linux system이 많고, <em>Shadow Suite</em>이 <em>없는</em> ELF-이전 배포판에게도 위험하기 때문이다. <p> <!--% For more information on this and other Linux security issues, see the <url url="http://bach.cis.temple.edu/linux/linux-security/Linux-Security-FAQ/Linux-telnetd.html" name="Linux Security home page (Shared Libraries and login Program Vulnerability)"> %--> 이 문제와 다른 Linux 보안관련 문제에 대해 더 자세히 알고 싶다면, <url url="http://bach.cis.temple.edu/linux/linux-security/Linux-Security-FAQ/Linux-telnetd.html" name="Linux Security home page (Shared Libraries and login Program Vulnerability)">를 참조하라. <!--% <sect1><heading>Where to get the Shadow Suite. %--> <sect1><heading>어디서 Shadow Suite를 얻습니까? <p> <!--% The only recommended <em>Shadow Suite</em> is still in BETA testing, however the latest versions are safe in a production environment and don't contain a vulnerable <tt>login</tt> program. %--> 권할만한 <em>Shadow Suite</em>은 아직 BETA testing중이다. 어쨌든 최근 version이 안전하며, 취약한 <tt>login</tt> program을 포함하지 않는다. <p> <!--% The package uses the following naming convention: <tscreen><verb>shadow-YYMMDD.tar.gz</verb></tscreen> where <tt>YYMMDD</tt> is the issue date of the Suite. %--> package는 다음과 같은 명명규칙을 갖는다: <tscreen><verb>shadow-YYMMDD.tar.gz</verb></tscreen> <tt>YYMMDD</tt>는 Suite가 발표된 날짜이다. <p> <!--% This version will eventually be <em>Version 3.3.3</em> when it is released from Beta testing, and is maintained by <htmlurl url="mailto:marekm@i17linuxb.ists.pwr.wroc.pl" name="Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl>">. It's available as: <url url="ftp://i17linuxb.ists.pwr.wroc.pl/pub/linux/shadow/shadow-current.tar.gz" name="shadow-current.tar.gz">. %--> 이 version은 Beta testing이 끝나면, 결국 <em>Version 3.3.3</em>이 될것이고, <htmlurl url="mailto:marekm@i17linuxb.ists.pwr.wroc.pl" name="Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl>">에 의해서 유지보수 되고 있다. <url url="ftp://i17linuxb.ists.pwr.wroc.pl/pub/linux/shadow/shadow-current.tar.gz" name="shadow-current.tar.gz">에서 얻을 수 있다. <p> <!--% The following mirror sites have also been established: %--> 또한, 다음에 나오는 mirror site들에서 얻을 수 있다: <itemize> <item><htmlurl url="ftp://ftp.icm.edu.pl/pub/Linux/shadow/shadow-current.tar.gz" name="ftp://ftp.icm.edu.pl/pub/Linux/shadow/shadow-current.tar.gz"> <item><htmlurl url="ftp://iguana.hut.fi/pub/linux/shadow/shadow-current.tar.gz" name="ftp://iguana.hut.fi/pub/linux/shadow/shadow-current.tar.gz"> <item><htmlurl url="ftp://ftp.cin.net/usr/ggallag/shadow/shadow-current.tar.gz" name="ftp://ftp.cin.net/usr/ggallag/shadow/shadow-current.tar.gz"> <item><htmlurl url="ftp://ftp.netural.com/pub/linux/shadow/shadow-current.tar.gz" name="ftp://ftp.netural.com/pub/linux/shadow/shadow-current.tar.gz"> </itemize> <p> <!--% You should use the currently available version. %--> 현재 나와있는 version을 사용하기 바란다. <p> <!--% You should NOT use a version <em>older</em> than <tt>shadow-960129</tt> as they also have the <tt>login</tt> security problem discussed above. %--> <tt>shadow-960129</tt>보다 <em>이전에 나온</em> version을 쓰지 말기 바란다: 앞에서 논의한 <tt>login</tt> 보안 허점이 있다. <p> <!--% When this document refers to the <em>Shadow Suite</em> I am referring to the this package. It is assumed that this is the package that you are using. %--> 이 문서에서 <em>Shadow Suite</em>라고 말하는 것은 이 version을 가리킨다. 또한, 당신이 사용하고 있는 package라고 가정한다. <p> <!--% For reference, I used <tt>shadow-960129</tt> to make these installation instructions. %--> 참고적으로, 설치 안내서를 작성하는 데, <tt>shadow-960129</tt>를 사용했다. <p> <!--% If you were previously using <tt>shadow-mk</tt>, you should upgrade to this version and rebuild everything that you originally compiled. %--> 이전에 <tt>shadow-mk</tt>를 사용했다면, 이 version으로 upgrade를 하고, 이전에 compile했던 것을 다시 하기 바란다. <!--% <sect1><heading>What is included with the Shadow Suite. %--> <sect1><heading>Shadow Suite에는 뭔가 있는 것같은 데... <p> <!--% The <em>Shadow Suite</em> contains replacement programs for: %--> <em>Shadow Suite</em>는 다음 program의 대체품을 가지고 있다: <p> <!--% <tt>su, login, passwd, newgrp, chfn, chsh, and id</tt> %--> <tt>su, login, passwd, newgrp, chfn, chsh, id</tt> <p> <!--% The package also contains the new programs: %--> 또한, 새로운 program들도 있다: <p> <!--% <tt>chage, newusers, dpasswd, gpasswd, useradd, userdel, usermod, groupadd, groupdel, groupmod, groups, pwck, grpck, lastlog, pwconv, and pwunconv</tt> %--> <tt>chage, newusers, dpasswd, gpasswd, useradd, userdel, usermod, groupadd, groupdel, groupmod, groups, pwck, grpck, lastlog, pwconv, pwunconv</tt> <p> <!--% Additionally, the library: <tt>libshadow.a</tt> is included for writing and/or compiling programs that need to access user passwords. %--> 덧붙여, library: <tt>libshadow.a</tt>가 사용자 password에 접근하는 program을 작성하거나 compile하기 위해 포함되어 있다. <p> <!--% Also, manual pages for the programs are also included. %--> 또한, program들을 위한 manual page도 있다. <p> <!--% There is also a configuration file for the login program which will be installed as <tt>/etc/login.defs</tt>. %--> <tt>/etc/login.defs</tt>로 설치되는 login program의 설정 file도 있다. <!--% <sect><heading>Compiling the programs. %--> <sect><heading>program들 만들기. <!--% <sect1><heading>Unpacking the archive. %--> <sect1><heading>압축풀기. <p> <!--% The first step after retrieving the package is unpacking it. The package is in the tar (tape archive) format and compressed using gzip, so first move it to <tt>/usr/src</tt>, then type: %--> package를 받을 뒤 처음 할 일은 풀어 제치는 것이다. package는 gzip으로 앞축된 tar (tape archive) 형식으로 되어 있으므로, <tt>/usr/src</tt>로 옮긴 뒤: <tscreen><verb>tar -xzvf shadow-current.tar.gz</verb></tscreen> <p> <!--% This will unpack it into the directory: <tt>/usr/src/shadow-YYMMDD</tt> %--> 그러면, <tt>/usr/src/shadown-YYMMDD</tt>라는 directory에 풀릴 것이다. <!--% <sect1><heading>Configuring with the config.h file %--> <sect1><heading>config.h file을 가지고 설정합니다. <p> <!--% The first thing that you need to do is to copy over the <tt>Makefile</tt> and the <tt>config.h</tt> file: %--> 첫째, <tt>Makefile</tt>과 <tt>config.h</tt>를 복사한다: <tscreen><verb>cd /usr/src/shadow-YYMMDD cp Makefile.linux Makefile cp config.h.linux config.h</verb></tscreen> <p> <!--% You should then take a look at the <tt>config.h</tt> file. This file contains definitions for some of the configuration options. If you are using the <em>recommended</em> package, I recommend that you disable group shadow support for your first time around. %--> 그리고 <tt>config.h</tt>를 보라. 이 file은 몇몇 설정 사항에 대한 정의를 담고 있다. 만일 <em>권고한</em> package를 가지고 있다면, 일단 group shadow 지원을 사용하지 않도록 하기를 권한다. <p> <!--% By default shadowed group passwords are enabled. To disable these edit the <tt>config.h</tt> file, and change the <tt>#define SHADOWGRP</tt> to <tt>#undef SHADOWGRP</tt>. I recommend that you disable them to start with, and then if you really want group passwords and group administrators that you enable it later and recompile. If you leave it enabled, you <em>must</em> create the file <tt>/etc/gshadow</tt>. %--> 기본으로, shadow된 group password들을 사용할 수 있다. 이를 바꾸기 위해서 <tt>config.h</tt>의 <tt>#define SHADOWGRP</tt>를 <tt>#undef SHADOWGRP</tt>로 바꾼다. 나는 그들을 사용하지 않고 시작할 것을 원한다. 나중에 절실히 group password와 group 관리자를 원한다면, 다시 사용가능하도록 한 뒤 재compile하면 된다. 만일 사용가능으로 남겨둔다면, <em>반드시</em> <tt>/etc/gshadow</tt> file을 만들어야 한다. <p> <!--% Enabling the long passwords option is NOT recommended as discussed above. %--> 긴 password 사용을 하는 것은 앞에서 얘기한대로 권하지 않는다. <p> <!--% <em>Do NOT</em> change the setting: <tt>#undef AUTOSHADOW</tt> %--> <tt>#undef AUTOSHADOW</tt>라고 한 것을 바꾸지 <em>말라</em>. <p> <!--% The <tt>AUTOSHADOW</tt> option was originally designed so that programs that were shadow ignorant would still function. This sounds good in theory, but does not work correctly. If you enable this option, and the program runs as root, it may call <tt>getpwnam()</tt> as root, and later write the modified entry back to the <tt>/etc/passwd</tt> file (with the <em>no-longer-shadowed password</em>). Such programs include chfn and chsh. (You can't get around this by swapping real and effective uid before calling <tt>getpwnam()</tt> because root may use chfn and chsh too.) %--> <tt>AUTOSHADOW</tt> 선택사항은 shadow를 무시하는 program들이 계속 작동하도록 하려는 목적으로 준비된 것이었다. 이 이야기는 이론상으로는 괜찮지만, 제대로 기능하지 않는다. 이 option을 허용하고 root로써 program을 실행시키면, 그 놈은 <tt>getpwnam()</tt>를 root권한으로 부르고, 후에 <tt>/etc/passwd</tt> file에 수정된 내용을 다시 쓰게 된다 (<em>더이상 shadow되지 않은</em> 채로). 그런 program에는 chfn과 chsh가 있다. (<tt>getpwnam()</tt>를 호출하기 전에, 실제 uid와 유효 uid를 바꾼다해도 이를 회피할 수 없다. 왜냐하면 root도 chfn과 chsh를 사용할 것이기때문이다. (역자주: 모호하네요. system programming에 관한 내용같는 데... 아시는 분의 설명 바랍니다.)) <p> <!--% The same warning is also valid if you are building libc, it has a <tt>SHADOW_COMPAT</tt> option which does the same thing. It <em>should NOT</em> be used! If you start getting encoded passwords back in your <tt>/etc/passwd</tt> file, this is the problem. %--> libc를 만들 때도 같은 경우가 있다. <tt>SHADOW_COMPAT</tt> option이 그 것이다. 그 것은 쓰면 <em>안 된다!</em> <tt>/etc/passwd</tt>로부터 encode된 password를 얻기 시작한다는 것이 문제다. <p> <!--% If you are using a <tt>libc</tt> version prior to 4.6.27, you will need to make a couple more changes to <tt>config.h</tt> and the <tt>Makefile</tt>. To <tt>config.h</tt> edit and change: <tscreen><verb>#define HAVE_BASENAME</verb></tscreen> to: <tscreen><verb>#undef HAVE_BASENAME</verb></tscreen> And then in the <tt>Makefile</tt>, change: %--> 지금 사용하고 있는 <tt>libc</tt> version이 4.6.27이전이라면, <tt>config.h</tt>와 <tt>Makefile</tt>을 고칠 것이 더 있다. <tt>config.h</tt>에서 바꿀 것은: <tscreen><verb>#define HAVE_BASENAME</verb></tscreen>을 <tscreen><verb>#undef HAVE_BASENAME</verb></tscreen>으로. 그리고 <tt>Makefile</tt>에서는: <tscreen><verb>SOBJS = smain.o env.o entry.o susetup.o shell.o \ sub.o mail.o motd.o sulog.o age.o tz.o hushed.o SSRCS = smain.c env.c entry.c setup.c shell.c \ pwent.c sub.c mail.c motd.c sulog.c shadow.c age.c pwpack.c rad64.c \ tz.c hushed.c </verb></tscreen>을 <tscreen><verb>SOBJS = smain.o env.o entry.o susetup.o shell.o \ sub.o mail.o motd.o sulog.o age.o tz.o hushed.o basename.o SSRCS = smain.c env.c entry.c setup.c shell.c \ pwent.c sub.c mail.c motd.c sulog.c shadow.c age.c pwpack.c rad64.c \ tz.c hushed.c basename.c </verb></tscreen>으로. <!--% These changes add the code contained in <tt>basename.c</tt> which is contained in <tt>libc 4.6.27</tt> and later. %--> 이 고침은 <tt>libc 4.6.27</tt>이나 그 이후에 포함된 <tt>basename.c</tt>에 있는 code를 덧붙인다. <!--% <sect1><heading>Making backup copies of your original programs. %--> <sect1><heading>원 program의 backup copy들을 만든다. <p> <!--% It would also be a good idea to track down and make backup copies of the programs that the shadow suite will replace. On a Slackware 3.0 system these are: %--> shadow suite가 대체시킬 program들을 추적해서 backup을 만드는 것도 좋은 생각이다. Slackware 3.0에는 다음과 같다: <itemize> <item>/bin/su <item>/bin/login <item>/usr/bin/passwd <item>/usr/bin/newgrp <item>/usr/bin/chfn <item>/usr/bin/chsh <item>/usr/bin/id </itemize> <p> <!--% The BETA package has a <em>save</em> target in the Makefile, but it's commented out because different distributions place the programs in different places. %--> BETA package는 Makefile에 <em>backup을 만들</em> 목록이 있지만, 다른 배포판에서 다른 위치에 놓여 있을 수 있기에 설명으로 처리되어 있다. <p> <!--% You should also make a backup copy of your <tt>/etc/passwd</tt> file, but be careful to name it something else if you place it in the same directory so you don't overwrite the <tt>passwd</tt> command. %--> 또한 <tt>/etc/passwd</tt> file을 backup받기를 바란다. 그러나, 같은 directory에 만들 때, <tt>passwd</tt> 명령으로 덮어 쓰지 못하도록, 이름을 정할 때 조심해라. <!--% <sect1><heading>Running make %--> <sect1><heading>make를 실행 <p> <!--% <em>You need to be logged as root to do most of the installation</em>. %--> <em>거의 대부분의 설치과정에서 당신이 root 권한을 지닐 필요가 있다</em>. <p> <!--% Run make to compile the executables in the package: %--> package를 compile하기 위해 make을 실행시킨다: <tscreen><verb>make all</verb></tscreen> <p> <!--% You may see the warning: <tt>rcsid defined but not used</tt>. This is fine, it just happens because the author is using a version control package. %--> 다음과 같은 경고문가 나오는 경우가 있다: <tt>rcsid defined but not used (rcsid가 정의되어 있지만 사용되지 않습니다)</tt>. 괜찮다, 이 건 저자가 version control package를 사용하기에 나오는 것이다. <!--% <sect><heading>Installing %--> <sect><heading>설치 <!--% <sect1><heading>Have a boot disk handy in case you break anything. %--> <sect1><heading>일이 잘못돼어 갈 경우를 대비해서 boot disk를 준비합시다. <p> <!--% If something goes terribly wrong, it would be handy to have a boot disk. If you have a boot/root combination from your installation, that will work, otherwise see the <url url="http://sunsite.unc.edu/mdw/HOWTO/Bootdisk-HOWTO.html" name="Bootdisk-HOWTO">, which describes how to make a bootable disk. %--> 뭔가 잘못되어 간다면, boot disk를 준비해야 될 것이다. 설치시 boot/root disk를 사용했다면, 그 걸로 충분하다. 그렇지 않다면, <url url="http://sunsite.unc.edu/mdw/HOWTO/Bootdisk-HOWTO.html" name="Bootdisk-HOWTO">에 booting가능한 disk를 만드는 법이 적혀있으니 참조하라. <!--% <sect1><heading>Removing duplicate man pages %--> <sect1><heading>중복된 man page들을 제거하기 <p> <!--% You should also move the manual pages that are about to be replaced. Even if you are brave enough install the Shadow Suite without making backups, you will still want to remove the old manual pages. The new manual pages won't normally overwrite the old ones because the old ones are probably compressed. %--> 또한, 대체될 manual page들을 옮기길 바란다. 심지어 backup없이 Shadow Suite를 설치할 정도로 무모할지더라도, 여전히 옛 manual page들은 제거하기를 원할 것이다. 대개 옛 manual page가 압축되어 보관되어 있으므로, 새 것들은 이전 것에 덮어쓰지 못할 수 있다. <p> <!--% You can use a combination of: <tt>man -aW command</tt> and <tt>locate command</tt> to locate the manual pages that need to be (re)moved. It's generally easier to figure out which are the older pages before you run <tt>make install</tt>. %--> 제거 또는 옮길 필요가 있는 manual page를 찾기 위해 <tt> man -aW command</tt>나 <tt>locate command</tt>를 사용할 수 있다. <tt>make install</tt>을 실행시키기 전에 그런 식으로 옛 page들을 찾는 것이 일반적으로 더 쉽다. <p> <!--% If you are using the Slackware 3.0 distribution, then the manual pages you want to remove are: %--> Slackware 3.0 배포판을 사용한다면, 제거해야 할 man page들은: <itemize> <item>/usr/man/man1/chfn.1.gz <item>/usr/man/man1/chsh.1.gz <item>/usr/man/man1/id.1.gz <item>/usr/man/man1/login.1.gz <item>/usr/man/man1/passwd.1.gz <item>/usr/man/man1/su.1.gz <item>/usr/man/man5/passwd.5.gz </itemize> <p> <!--% There may also be man pages of the same name in the <tt>/var/man/cat[1-9]</tt> subdirectories that should also be deleted. %--> 또, <tt>/var/man/cat[1-9]</tt>의 subdirectory에 삭제해야 할 것과 같은 이름을 지닌 놈들이 있다. <!--% <sect1><heading>Running make install %--> <sect1><heading>make install을 실행 <p> <!--% You are now ready to type: (do this as root) %--> 이제 준비가 끝났다: (root로서 이 일을 합시다) <tscreen<verb>make install</verb></tscreen> <p> <!--% This will install the new and replacement programs and fix-up the file permissions. It will also install the man pages. %--> 이 일은 새 것을 깔거나, 옛 것과 대체하며 file permission을 고친다. 또, man page도 설치한다. <p> <!--% This also takes care of installing the Shadow Suite include files in the correct places in <tt>/usr/include/shadow</tt>. %--> 그리고, <tt>/usr/include/shadow</tt>에 Shadow Suite에 있는 include file을 설치해준다. <p> <!--% Using the BETA package you must manually copy the file <tt>login.defs</tt> to the <tt>/etc</tt> subdirectory and make sure that only <em>root</em> can make changes to it. %--> BETA package를 쓴다면, 직접 <tt>login.defs</tt>를 <tt>/etc</tt>에 복사하고, <em>root</em>만이 이를 바꿀 수 있도록 해주어야 한다. <tscreen><verb>cp login.defs /etc chmod 700 /etc/login.defs</verb></tscreen> <p> <!--% This file is the configuration file for the <em>login</em> program. You should review and make changes to this file for your particular system. This is where you decide which tty's root can login from, and set other security policy settings (like password expiration defaults). %--> 이 file은 <em>login</em> program의 설정 file이다. 내용을 다시 보고, 당신의 system에 맞게 고치기 바란다. 이것은 root로 login할 수 있는 tty를 결정하고, 다른 보안 관련 setting을 결정한다(password 취소에 대한 기본값같은). <!--% <sect1><heading>Running pwconv %--> <sect1><heading>pwconv 실행 <p> <!--% The next step is to run <tt>pwconv</tt>. This must also be done as <em>root</em>, and is best done from the <tt>/etc</tt> subdirectory: %--> 다음 일은 <tt>pwconv</tt>를 실행시키는 것이다. 반드시 <em>root</em>로서 이 일을 해야 될 뿐만 아니라, <tt>/etc</tt> directory에서 하면 금상첨화다: <tscreen><verb>cd /etc /usr/sbin/pwconv</verb></tscreen> <p> <!--% <tt>pwconv</tt> takes your <tt>/etc/passwd</tt> file and strips out the fields to create two files: <tt>/etc/npasswd</tt> and <tt>/etc/nshadow</tt>. %--> <tt>pwconv</tt>는 <tt>/etc/passwd</tt>와 그 안에서 몇몇 field을 가져와 다음 두 file을 만든다: <tt>/etc/npasswd</tt> 와 <tt>/etc/nshadow</tt>. <p> <!--% A <tt>pwunconv</tt> program is also provided if you need to make a normal <tt>/etc/passwd</tt> file out of an <tt>/etc/passwd</tt> and <tt>/etc/shadow</tt> combination. %--> <tt>pwunconv</tt> program은 <tt>/etc/passwd</tt>와 <tt>/etc/shadow</tt>로부터 평범한 <tt>/etc/passwd</tt> file을 만들 경우에 대비해 주어진다. <!--% <sect1><heading>Renaming npasswd and nshadow %--> <sect1><heading>npasswd와 nshadow의 이름을 바꾼다. <p> <!--% Now that you have run <tt>pwconv</tt> you have created the files <tt>/etc/npasswd</tt> and <tt>/etc/nshadow</tt>. These need to be copied over to <tt>/etc/passwd</tt> and <tt>/etc/shadow</tt>. We also want to make a backup copy of the original <tt>/etc/passwd</tt> file, and make sure only root can read it. We'll put the backup in root's home directory: %--> 이제 <tt>pwconv</tt>를 실행시켜서 <tt>/etc/npasswd</tt>와 <tt>/etc/nshadow</tt>를 얻었다. 이 것들을 <tt>/etc/passwd</tt>와 <tt>/etc/shadow</tt>로 덮어쓸 필요가 있다. 우리는 원 <tt>/etc/passwd</tt>를 backup을 받기를 원하고, root만 읽을 수 있게 한다. 그리고 backup을 root의 home directory로 옮긴다: <tscreen><verb>cd /etc cp passwd ~passwd chmod 600 ~passwd mv npasswd passwd mv nshadow shadow</verb></tscreen> <p> <!--% You should also ensure that the file ownerships and permissions are correct. If you are going to be using <em>X-Windows</em>, the <tt>xlock</tt> and <tt>xdm</tt> programs need to be able to read the <tt>shadow</tt> file (but not write it). %--> file의 소유와 permission에 관한 것을 정확하게 해라. <em>X-Windows</em>를 쓸 생각이라면, <tt>xlock</tt>와 <tt>xdm</tt> program은 <tt>shadow</tt> file을 읽을 수 있게 한다 (쓰는 것은 말고). <p> <!--% There are two ways that this can be done. You can set <tt>xlock</tt> to suid root (<tt>xdm</tt> is usually run as root anyway). Or you can make the <tt>shadow</tt> file owned by <tt>root</tt> with a group of <tt>shadow</tt>, but before you do this, make sure that you have a shadow group (look in <tt>/etc/group</tt>). None of the users on the system should actually be in the shadow group. %--> 이 일을 가능하게 하는 방법은 두가지다. <tt>xlock</tt>에 suid root를 설정해 줄 수 있다(<tt>xdm</tt>가 root의 권한으로 실행될 수 있다). 또는 <tt>shadow</tt> file을 <tt>shadow</tt> group의 <tt>root</tt>가 소유한 것으로 만드는 것이다. 그러나 두 번째 제안을 하기 전에 shadow group(<tt>/etc/group</tt>를 보라)이 있는 지 확실히 해라. 현재 system의 어떤 사용자도 shadow group에 속해있으면 안된다. <tscreen><verb>chown root.root passwd chown root.shadow shadow chmod 0644 passwd chmod 0640 shadow</verb></tscreen> <p> <!--% Your system now has the password file shadowed. You <em>should</em> now pop over to another virtual terminal and verify that you can login. %--> 이제 system을 shadow된 password file을 가지게 되었다. 다른 가상 terminal을 띄우고, login할 수 있는 지 점검하는 것이 <em>좋을 것이다</em>. <p> <!--% <em>Really, do this now!</em> %--> <em>지금 해라!</em> <p> <!--% If you can't, then something is wrong! To get back to a non-shadowed state, do the following the following: %--> 안 돼면, 뭔가 잘못된거다! shadow되지 않은 상태로 돌아가기 위해서 다음처럼 한다: <tscreen><verb>cd /etc cp ~passwd passwd chmod 644 passwd</verb></tscreen> <p> <!--% You would then restore the files that you saved earlier to their proper locations. %--> 그리고 나서, 이전에 있던 장소로 모든 file을 되돌려 놓아야 할 것이다. <!--% <sect><heading>Other programs you may need to upgrade or patch %--> <sect><heading>patch하거나 upgrade할 필요가 있는 다른 program들 <p> <!--% Even though the shadow suite contains replacement programs for most programs that need to access passwords, there are a few additional programs on most systems that require access to passwords. %--> password로 접근을 필요로 하는 대부분 program들의 대치품이 shadow suite에 포함되어 있다고 해도, 대부분 system에서 password 접근을 필요로 하는 다른 program들이 있다. <p> <!--% If you are running a <em>Debian Distribution</em> (or even if you are not), you can obtain Debian sources for the programs that need to be rebuild from: ftp://ftp.debian.org/debian/stable/source/ %--> <em>Debian 배포판</em>을 쓰고 있다면 (또는 쓰고 있지 않더라도), ftp://ftp.debian.org/debian/stable/source/로부터 다시 만들어야 될 program들의 Debian source를 얻을 수 있다. <p> <!--% The remainder of this section discusses how to upgrade <tt>adduser</tt>, <tt>wu_ftpd</tt>, <tt>ftpd</tt>, <tt>pop3d</tt>, <tt>xlock</tt>, <tt>xdm</tt> and <tt>sudo</tt> so that they support the shadow suite. %--> 이 section의 나머지 부분은 <tt>adduser</tt>, <tt>wu_ftpd</tt>, <tt>ftpd</tt>, <tt>pop3d</tt>, <tt>xlock</tt>, <tt>xdm</tt>, <tt>sudo</tt>같은 program들이 shadow suite를 지원하도록 upgrade하는 법에 대해 다루고 있다. <p> <!--% See the section <ref id="sec-adding" name="Adding Shadow Support to a C program"> for a discussion on how to put shadow support into any other program that needs it (although the program must then be run SUID root or SGID shadow to be able to actually access the shadow file). %--> shadow suite에 대한 지원을 어떻게 program에 넣는가하는 문제는 section <ref id="sec-adding" name="C program에 Shadow를 지원하도록 덧붙이기">를 보라 (그리고나서 program이 shadow file을 접근할 수 있도록 SUID root나 SGID shadow로 실행해야 되지만) <sect1><heading>Slackware adduser program <p> <!--% Slackware distributions (and possibly some others) contain a interactive program for adding users called <tt>/sbin/adduser</tt>. A shadow version of this program can be obtained from <htmlurl url="ftp://sunsite.unc.edu/pub/Linux/system/Admin/accounts/adduser.shadow-1.4.tgz" name="ftp://sunsite.unc.edu/pub/Linux/ system/Admin/accounts/adduser.shadow-1.4.tar.gz">. %--> Slackware 배포판( 다른 것들중에서도)은 <tt>/sbin/adduser</tt>라고 불리우는 사용자를 추가할 때 쓰는 대화식 program을 포함하고 있다. 이 program의 shadow version은 <htmlurl url="ftp://sunsite.unc.edu/pub/Linux/system/Admin/accounts/adduser.shadow-1.4.tgz" name="ftp://sunsite.unc.edu/pub/Linux/system/Admin/accounts/adduser.shadow-1.4.tar.gz">에서 구할 수 있다. <p> <!--% I would encourage you to use the programs that are supplied with the <em>Shadow Suite</em> (<tt>useradd</tt>, <tt>usermod</tt>, and <tt>userdel</tt>) instead of the slackware <tt>adduser</tt> program. They take a little time to learn how to use, but it's well worth the effort because you have much more control and they perform proper file locking on the <tt>/etc/passwd</tt> and <tt>/etc/shadow</tt> file (<tt>adduser</tt> doesn't). %--> 나는 slackware의 <tt>adduser</tt>대신에 <em>Shadow Suite</em>에 있는 program들 (<tt>useradd</tt>, <tt>usermod</tt>, <tt>userdel</tt>)을 사용할 것을 권한다. 그들을 익히는 데 다소 시간이 걸리지만, 그만한 값어치를 한다. 왜냐하면 당신은 좀더 자세히 control할 수 있고, <tt>/etc/passwd</tt>와 <tt>/etc/shadow</tt>에 알맞은 file locking을 행해주기 때문이다 (<tt>adduser</tt>는 아니다). <p> <!--% See the section on <ref id="sec-work" name="Putting the Shadow Suite to use"> for more information. %--> 종 더 자세한 걸 알고 싶으면 <ref id="sec-work" name="Shadow Suite 사용하기">를 참조하도록. <p> <!--% But if you gotta have it, here is what you do: %--> 하지만, 가지고 있다면 다음처럼 해라: <tscreen><verb>tar -xzvf adduser.shadow-1.4.tar.gz cd adduser make clean make adduser chmod 700 adduser cp adduser /sbin</verb></tscreen> <sect1><heading>The wu_ftpd Server <p> <!--% Most Linux systems some with the <tt>wu_ftpd</tt> server. If your distribution does not come with shadow installed, then your <tt>wu_ftpd</tt> will not be compiled for shadow. <tt>wu_ftpd</tt> is launched from <tt>inetd/tcpd</tt> as a <em>root</em> process. If you are running an old <tt>wu_ftpd</tt> daemon, you will want to upgrade it anyway because older ones had a bug that would allow the <em>root</em> account to be compromised (For more info see the <url url="http://bach.cis.temple.edu/linux/linux-security/Linux-Security-FAQ/Linux-wu.ftpd-2.4-Update.html" name="Linux security home page">). %--> 대부분 Linux system은 <tt>wu_ftpd</tt> server를 쓰고 있다. 배포판으로부터 shadow를 설치하지 않았다면, 당신의 <tt>wu_ftpd</tt>는 shadow 지원을 하도록 compile되지 않았다. <tt>wu_ftpd</tt>는 <em>root</em> process로써 실행되는 <tt>inetd/tcpd</tt>로부터 시작된다. 아직도 낡은 <tt>wu_ftpd</tt> deamon을 쓰고 있다면, 그 놈은 <em>root</em> 계정을 위태롭게 하는 bug를 지니고 있기에 무조건 upgrade를 해야 된다 (<url url="http://bach.cis.temple.edu/linux/linux-security/Linux-Security-FAQ/Linux-wu.ftpd-2.4-Update.html" name="Linux security home page">를 참조). <p> <!--% Fortunately, you only need to get the source code and recompile it with shadow enabled. %--> 다행히 source code를 가져와 shadow가 가능하도록 재compile하기만 하면 된다. <p> <!--% If you are not running an ELF system, The <tt>wu_ftp</tt> server can be found on Sunsite as <url url="ftp://sunsite.unc.edu/pub/Linux/system/Network/file-transfer/wu-ftpd-2.4-fixed.tar.gz" name="wu-ftp-2.4-fixed.tar.gz"> %--> 쓰고 있는 것이 ELF system이 아니라면, <tt>wu_ftp</tt> server는 sunsite의 <url url="ftp://sunsite.unc.edu/pub/Linux/system/Network/file-transfer/wu-ftpd-2.4-fixed.tar.gz" name="wu-ftp-2.4-fixed.tar.gz">를 쓰면 된다. <p> <!--% Once you retrieve the server, put it in <tt>/usr/src</tt>, then type: %--> 일단 가져와서 <tt>/usr/src</tt>에 놓은 뒤: <tscreen><verb>cd /usr/src tar -xzvf wu-ftpd-2.4-fixed.tar.gz cd wu-ftpd-2.4-fixed cp ./src/config/config.lnx.shadow ./src/config/config.lnx</verb></tscreen> <p> <!--% Then edit <tt>./src/makefiles/Makefile.lnx</tt>, and change the line: %--> 그런다음 <tt>./src/makefiles/Makefile.lnx</tt>을 수정한다: <tscreen><verb>LIBES = -lbsd -support</verb></tscreen> <!--% to: %--> 를: <tscreen><verb>LIBES = -lbsd -support -lshadow</verb></tscreen>으로. <p> <!--% Now you are ready to run the build script and install: %--> 이제 script를 만들고 설치하기 위한 준비가 끝났다: <tscreen><verb>cd /usr/src/wu-ftpd-2.4-fixed /usr/src/wu-ftp-2.4.fixed/build lnx cp /usr/sbin/wu.ftpd /usr/sbin/wu.ftpd.old cp ./bin/ftpd /usr/sbin/wu.ftpd</verb></tscreen> <p> <!--% This uses the Linux shadow configuration file, compiles and installs the server. %--> 이는 Linux shadow 설정 file을 사용해서 compile하고 server를 설치한다. <p> <!--% On my Slackware 2.3 system I also had to do the following before running <tt>build</tt>: %--> 내 Slackware 2.3 system에서는 <tt>build</tt>를 실행시키기 전에 다음과 같은 일을 해야 했다: <tscreen><verb>cd /usr/include/netinet ln -s in_systm.h in_system.h cd -</verb></tscreen> <p> <!--% Problems have been reported compiling this package under ELF systems, but the Beta version of the next release works fine. It can be found as <url url="ftp://tscnet.com/pub/linux/network/ftp/wu-ftpd-2.4.2-beta-10.tar.gz" name="wu-ftp-2.4.2-beta-10.tar.gz"> %--> ELF system에서 이 package를 compile하는 데 몇가지 문제점들이 보고 되었지만, 다음 release의 Beta version에서는 잘 된다. 그것은 <url url="ftp://tscnet.com/pub/linux/network/ftp/wu-ftpd-2.4.2-beta-10.tar.gz" name="wu-ftp-2.4.2-beta-10.tar.gz">이다. <p> <!--% Once you retrieve the server, put it in <tt>/usr/src</tt>, then type: %--> 일단 가져와서 <tt>/usr/src</tt>에 놓은 뒤: <tscreen><verb>cd /usr/src tar -xzvf wu-ftpd-2.4.2-beta-9.tar.gz cd wu-ftpd-beta-9 cd ./src/config</verb></tscreen> <p> <!--% Then edit <tt>config.lnx</tt>, and change: %--> 그런 뒤 <tt>config.lnx</tt>를 수정한다: <tscreen><verb>#undef SHADOW.PASSWORD</verb></tscreen> <!--% to: %--> 을: <tscreen><verb>#define SHADOW.PASSWORD</verb></tscreen>으로. <!--% Then, %--> 그리고 <tscreen><verb>cd ../Makefiles</verb></tscreen> <!--% and edit the file <tt>Makefile.lnx</tt> and change: %--> <tt>Makefile.lnx</tt>를 수정한다: <tscreen><verb>LIBES = -lsupport -lbsd # -lshadow</verb></tscreen> <!--% to: %--> 를: <tscreen><verb>LIBES = -lsupport -lbsd -lshadow</verb></tscreen>으로. <!--% Then build and install: %--> 마지막으로 만들고 설치: <tscreen><verb>cd .. build lnx cp /usr/sbin/wu.ftpd /usr/sbin/wu.ftpd.old cp ./bin/ftpd /usr/sbin/wu.ftpd</verb></tscreen> <p> <!--% Note that you should check your <tt>/etc/inetd.conf</tt> file to make sure that this is where your wu.ftpd server really lives. It has been reported that some distributions place the server daemons in different places, and then wu.ftpd in particular may be named something else. %--> 당신의 wu.ftpd server가 실제로 어디 있는 지 확인하기 위해 <tt>/etc/inetd.conf</tt>를 점검해 보라. 어떤 배포판에서는 server deamon을 다른 장소에 두고, 특히 wu.ftpd는 다른 이름을 하고 있다는 말이 있다. <!--% <sect1><heading>Standard ftpd %--> <sect1><heading>표준 ftpd <p> <!--% If you are running the standard <tt>ftpd</tt> server, I would recommend that you upgrade to the <tt>wu_ftpd</tt> server. Aside from the known bug discussed above, it's generally thought to be more secure. %--> 표준 <tt>ftpd</tt> server를 쓰고 있다면 <tt>wu_ftpd</tt> server를 쓰도록 권한다. 위에서 얘기한 bug외에는 일반적으로 더 안전한 것으로 알려져 있다. <p> <!--% If you insist on the standard one, or you need <em>NIS</em> support, Sunsite has <url url="ftp://sunsite.unc.edu/pub/Linux/system/Network/file-transfer/ftpd-shadow-nis.tgz" name="ftpd-shadow-nis.tgz"> %--> 표준을 계속 고수하거나 <em>NIS</em>을 지원할 필요가 있다면, Sunsite에 <url url="ftp://sunsite.unc.edu/pub/Linux/system/Network/file-transfer/ftpd-shadow-nis.tgz" name="ftpd-shadow-nis.tgz">가 있다. <sect1><heading>pop3d (Post Office Protocol 3) <p> <!--% If you need to support the third <em>Post Office Protocol (POP3)</em>, you will need to recompile a <tt>pop3d</tt> program. <tt>pop3d</tt> is normally run by <tt>inetd/tcpd</tt> as <tt>root</tt>. %--> <em>POP3</em>가 필요하면, <tt>pop3d</tt> program을 재compile해야 한다. <tt>pop3d</tt>는 <tt>root</tt> 권한으로 <tt>inetd/tcpd</tt>에 의해 실행된다. <p> <!--% There are two versions available from Sunsite: %--> Sunsite에 두가지 version이 있다: <url url="ftp://sunsite.unc.edu/pub/Linux/system/Mail/pop/pop3d-1.00.4.linux.shadow.tar.gz" name="pop3d-1.00.4.linux.shadow.tar.gz"> <!--% and %--> 와 <url url="ftp://sunsite.unc.edu/pub/Linux/system/Mail/pop/pop3d+shadow+elf.tar.gz" name="pop3d+shadow+elf.tar.gz"> <p> <!--% Both of these are fairly straight forward to install. %--> 둘 다 설치까지 수월하게 진행된다. <sect1><heading>xlock <p> <!--% If you install the shadow suite, and then run <em>X Windows System</em> and lock the screen without upgrading your <tt>xlock</tt>, you will have to use <tt>CNTL-ALT-Fx</tt> to switch to another <em>tty</em>, login, and kill the <tt>xlock</tt> process (or use <tt>CNTL-ALT-BS</tt> to kill the X server). Fortunately it's fairly easy to upgrade your <tt>xlock</tt> program. %--> shadow suite를 설치하고, <em>X Windows System</em>과 upgrade하지 않고 <tt>xlock</tt>으로 screen에 lock을 건다면, <tt>Ctrl-Atl-Fx</tt>를 눌러 다른 <em>tty</em>로 login한 뒤 <tt>xlock</tt> process를 죽여 할 것이 틀림없다 (또는 <tt>Ctrl-Alt-BS</tt>로 X server를 죽이던가). 다행히 <tt>xlock</tt> program을 upgrade하는 것은 쉽다. <p> <!--% If you are running XFree86 Versions 3.x.x, you are probably using <tt>xlockmore</tt> (which is a great screen-saver in addition to a lock). This package supports <em>shadow</em> with a recompile. If you have an older <tt>xlock</tt>, I recommend that you upgrade to this one. %--> XFree86 3.x.x를 쓰고 있다면, 아마도 <tt>xlockmore</tt> (lock기능에 훌륭한 screen-saver까지 있는)를 쓰고 있을 것이다. 이 package는 <em>shadow</em>와 함께 재compile할 수 있도록 되어 있다. 낡은 <tt>xlock</tt>를 쓰고 있다면, 이 걸로 upgrade하도록 권한다. <p> <!--% <tt>xlockmore-3.7.tgz</tt> is available at: <url url="ftp://sunsite.unc.edu/pub/Linux/X11/xutils/screensavers/xlockmore-3.7.tgz"> %--> <tt>xlockmore-3.7.tgz</tt>는 <url url="ftp://sunsite.unc.edu/pub/Linux/X11/xutils/screensavers/xlockmore-3.7.tgz"> 에 있다. <p> <!--% Basically, this is what you need to do: %--> 대개, 이게 구미에 딱 맞을 것이다. <p> <!--% Get the <tt>xlockmore-3.7.tgz</tt> file and put it in <tt>/usr/src</tt> unpack it: %--> <tt>xlockmore-3.7.tgz</tt>을 구한 다음, <tt>/usr/src</tt>에 푼다: <tscreen><verb>tar -xzvf xlockmore-3.7.tgz</verb></tscreen> <p> <!--% Edit the file: <tt>/usr/X11R6/lib/X11/config/linux.cf</tt>, and change the line: <tscreen><verb>#define HasShadowPasswd NO to #define HasShadowPasswd YES</verb></tscreen> %--> <tt>/usr/X11R6/lib/X11/config/linux.cf</tt> file의 다음 line을 바꾸면 된다: <tscreen><verb>#define HasShadowPasswd NO 를 다음처럼 #define HasShadowPasswd YES</verb></tscreen> <p> <!--% Then build the executables: %--> 그리고 나서 실행 file을 만들자: <tscreen><verb>cd /usr/src/xlockmore xmkmf make depend make</verb></tscreen> <p> <!--% Then move everything into place and update file ownerships and permissions: %--> 마지막으로 모두 제자리에, 바른 permission을 지니게 하면 끝이다: <tscreen><verb>cp xlock /usr/X11R6/bin/ cp XLock /var/X11R6/lib/app-defaults/ chown root.shadow /usr/X11R6/bin/xlock chmod 2755 /usr/X11R6/bin/xlock chown root.shadow /etc/shadow chmod 640 /etc/shadow</verb></tscreen> <p> <!--% Your xlock will now work correctly. %--> 이제 xlock은 잘 돌아갈 것이다. <sect1><heading>xdm <p> <!--% <tt>xdm</tt> is a program that presents a login screen for X-Windows. Some systems start <tt>xdm</tt> when the system is told to goto a specified run level (see <tt>/etc/inittab</tt>. %--> <tt>xdm</tt>는 X-Windows상에서의 login screen을 보여준다. 어떤 system은 특정 level로 가도록 지정하면 <tt>xdm</tt>을 시동시킨다(<tt>/etc/inittab</tt>를 보도록). <P> <!--% With the <em>Shadow Suite</em> install, <tt>xdm</tt> will need to be updated. Fortunately it's fairly easy to upgrade your <tt>xdm</tt> program. %--> <em>Shadow Suite</em>가 설치되면 <tt>xdm</tt>도 update될 필요가 있다. 이는 매우 쉽다. <p> <!--% <tt>xdm.tar.gz</tt> is available at: <url url="ftp://sunsite.unc.edu/pub/Linux/X11/xutils/xdm.tar.gz"> %--> <tt>xdm.tar.gz</tt>는 <url url="ftp://sunsite.unc.edu/pub/Linux/X11/xutils/xdm.tar.gz">에 있다. <p> <!--% Get the <tt>xdm.tar.gz</tt> file and put it in <tt>/usr/src</tt>, then to unpack it: %--> <tt>xdm.tar.gz</tt>를 구한 다음, <tt>/usr/src</tt>에서 푼다: <tscreen><verb>tar -xzvf xdm.tar.gz</verb></tscreen> <p> <!--% Edit the file: <tt>/usr/X11R6/lib/X11/config/linux.cf</tt>, and change the line: <tscreen><verb>#define HasShadowPasswd NO to #define HasShadowPasswd YES</verb></tscreen> %--> <tt>/usr/X11R6/lib/X11/config/linux.cf</tt>에서 다음 line을 고친다: <tscreen><verb>#define HasShadowPasswd NO 를 다음처럼 #define HasShadowPasswd YES</verb></tscreen> <p> <!--% Then build the executables: %--> 그리고 나서 실행 file을 만들자: <tscreen><verb>cd /usr/src/xdm xmkmf make depend make</verb></tscreen> <p> <!--% Then move everything into place: %--> 모든 걸 제자리로...: <tscreen><verb>cp xdm /usr/X11R6/bin/</verb></tscreen> <p> <!--% <tt>xdm</tt> is run as <em>root</em> so you don't need to change it's file permissions. %--> <tt>xdm</tt>은 <em>root</em> 권한으로 실행되기에 permission을 바꿀 필요는 없다. <sect1><heading>sudo <p> <!--% The program <tt>sudo</tt> allows a system administrator to let users run programs that would normally require root access. This is handy because it lets the administrator limit access to the root account itself while still allowing users to do things like mounting drives. %--> <tt>sudo</tt>는 시스템 관리자가 사용자로 하여금 정상적으로 root 권한을 가지고 program들을 실행할 수 있게 하도록 허용해준다. 이 것은 drive를 mount하는 것과 같은 일을 사용자가 할 수 있도록 허용함으로써, system 관리자가 root 계정으로 접속할 필요를 억제할 수 있다는 면에서 간편하다. <p> <!--% <tt>sudo</tt> needs to read passwords because it verifies the users password when it's invoked. <tt>sudo</tt> already runs SUID root, so accessing the <tt>/etc/shadow</tt> file is not a problem. %--> <tt>sudo</tt>는 실행될 때 사용자 password를 확인하기 때문에 password를 읽을 필요가 있다. <tt>sudo</tt>는 이미 SUID root상태로 동작되기에 <tt>/etc/shadow</tt> file에 접근하는 데 문제는 없다. <p> <!--% <tt>sudo</tt> for the shadow suite, is available as at: <url url="ftp://sunsite.unc.edu/pub/Linux/system/Admin/sudo-1.2-shadow.tgz"> %--> shadow suite에 맞는 <tt>sudo</tt>는 <url url="ftp://sunsite.unc.edu/pub/Linux/system/Admin/sudo-1.2-shadow.tgz">에 있다. <p> <!--% <em>Warning</em>: When you install <tt>sudo</tt> your <tt>/etc/sudoers</tt> file will be replaced with a default one, so you need to make a backup of it if you have added anything to the default one. (you could also edit the Makefile and remove the line that copies the default file to <tt>/etc</tt>). %--> <em>경고</em>: <tt>sudo</tt>를 설치할 때, 기존의 <tt>/etc/sudoers</tt>는 기본 설정으로 대체된다. 그러므로 기본 설정이외의 것을 쓰고 있다면 backup을 하기 바란다 (또는, Makefile에서 기본 설정 file을 <tt>/etc</tt>로 복사하도록 지시하는 line을 제거하면 된다). <p> <!--% The package is already setup for shadow, so all that's required is to recompile the package (put it in <tt>/usr/src</tt>): %--> 이 package는 이미 shadow를 쓸 수 있게 설정되어 있으므로, 재compile하기만 하면 된다 (<tt>/usr/src</tt>에 넣고): <tscreen><verb>cd /usr/src tar -xzvf sudo-1.2-shadow.tgz cd sudo-1.2-shadow make all make install</verb></tscreen> <sect1><heading>imapd (E-Mail [pine package]) <p> <!--% <tt>imapd</tt> is an e-mail server similar to <tt>pop3d</tt>. <tt>imapd</tt> comes with the <em>Pine E-mail</em> package. The documentation that comes with the package states that the default for Linux systems is to include support for shadow. However, I have found that this is not true. Furthermore, the build script / Makefile combination on this package is makes it very difficult to add the <tt>libshadow.a</tt> library at compile time, so I was unable to add shadow support for <tt>imapd</tt>. %--> <tt>imapd</tt>는 <tt>pop3d</tt>와 유사한 E-mail server이다. <tt>imapd</tt>는 <em>Pine E-mail</em>과 같이 있다. package에 들어 있는 문서는 linux system에서 shadow를 지원하도록 하는 것이 기본 설정이라고 하나, 사실이 아닌 것으로 나는 알고 있다. 더우기 이 package의 build script/Makefile 조합은 <tt>libshadow.a</tt>library를 compile할 때 덧붙이기 힘들게 한다. 고로 나는 <tt>imapd</tt>에 shadow를 지원하도록 고칠 수 없었다. <p> <!--% If anyone has this figured out, please E-mail me, and I'll include the solution here. %--> 혹시 이 일을 해낸 사람이 있으면 내게 E-mail을 보내기 바란다. 그러면 나는 이 곳에 해결법을 포함시키겠다. <sect1><heading>pppd (Point-to-Point Protocol Server) <p> <!--% The pppd server can be setup to use several types of authentication: <em>Password Authentication Protocol</em> (PAP) and <em>Cryptographic Handshake Authentication Protocol</em> (CHAP). The pppd server usually reads the password strings that it uses from <tt>/etc/ppp/chap-secrets</tt> and/or <tt>/etc/ppp/pap-secrets</tt>. If you are using this default behavior of pppd, it is not necessary to reinstall pppd. %--> pppd server는 여러가지 방식으로 인증할 수 있게 설정할 수 있다: <em>Password Authentication Protocol</em> (PAP)와 <em>Cryptographic Handshake Authentication Protocol</em> (CHAP). 대개 pppd server는 <tt>/etc/ppp/chap-secrets</tt>와/또는 <tt>/etc/ppp/pap-secrets</tt>에 있는 password를 읽는다. 이런 식으로 pppd를 쓴다면, pppd를 다시 설치할 필요가 없다. (역자주: ppp용 password를 따로 둔다는 뜻인 듯...) <p> <!--% pppd also allows you to use the <em>login</em> parameter (either on the command line, or in the configuration or <tt>options</tt> file). If the <em>login</em> option is given, then pppd will use the <tt>/etc/passwd</tt> file for the username and passwords for the <em>PAP</em>. This, of course, will no longer work now that our password file is shadowed. For pppd-1.2.1d this requires adding code for shadow support. %--> pppd는 <em>login</em> parameter를 사용할 수 있다 (command line이건, <tt>option</tt> file이나 설정을 통해서건). <em>login</em> option이 주어지면, pppd는 <em>PAP</em>를 위해 <tt>/etc/passwd</tt>에 있는 username과 password를 사용할 것이다. 물론 이 경우에 shadow된 password file은 쓸모없다. pppd-1.2.1d에서 shadow를 지원하도록 code를 덧붙여야 된다. <p> <!--% The example given in the next section is adding shadow support to <tt>pppd-1.2.1d</tt> (an older version of pppd). %--> 다음 section에서 <tt>pppd-1.2.1d</tt>에 shadow를 지원하도록 하는 예를 보일 것이다 (pppd의 옛 version). <p> <!--% <tt>pppd-2.2.0</tt> already contains shadow support. %--> <tt>pppd-2.2.0</tt>는 이미 shadow가 지원된다. <!--% <sect><heading>Putting the Shadow Suite to use.<label id="sec-work"> %--> <sect><heading>Shadow Suite 사용하기<label id="sec-work"> <p> <!--% This section discusses some of the things that you will want to know now that you have the <em>Shadow Suite</em> installed on your system. More information is contained in the manual pages for each command. %--> 이 section은 system에 <em>Shadow Suite</em>을 깔고 나서 알고 싶은 몇몇 주제를 다룬다. 더 자세한 것은 각 명령의 manual page를 참조하기 바란다. <!--% <sect1><heading>Adding, Modifying, and deleting users %--> <sect1><heading>사용자계정 추가, 수정, 삭제 <p> <!--% The <em>Shadow Suite</em> added the following command line oriented commands for adding, modifying, and deleting users. You may also have installed the <tt>adduser</tt> program. %--> <em>Shadow Suite</em>는 사용자 계정을 관리하는, 다음과 같은 명령들을 추가했다. 이미 <tt>adduser</tt> program은 그전에 설치되어 있었을 것이다. <sect2><heading>useradd <p> <!--% The <tt>useradd</tt> command can be used to add users to the system. You also invoke this command to change the default settings. %--> <tt>useradd</tt> 명령은 사용자를 추가한다. 또한, 기본 설정을 바꾸기 위해 이 명령을 실행할 수 있다. <p> <!--% The first thing that you should do is to examine the default settings and make changes specific to your system: %--> 처음 해야 할 일은 기본 설정을 확인하고, system에 맞게 고치는 것이다: <tscreen><verb>useradd -D</verb></tscreen><code> GROUP=1 HOME=/home INACTIVE=0 EXPIRE=0 SHELL= SKEL=/etc/skel</code> <p> <!--% The defaults are probably not what you want, so if you started adding users now you would have to specify all the information for each user. However, we can and should change the default values. %--> 기본 설정치는 아마 맘에 들지 않을 것이다. 따라서 지금 사용자를 추가하려면, 각각 사용자에게 공통되는 모든 정보를 정해야 한다. 어쨌든 우리는 기본 설정치를 바꾸고 덧붙일거다. <p> <!--% On my system: <itemize> <item>I want the default group to be 100 <item>I want passwords to expire every 60 days <item>I don't want to lock an account because the password is expired <item>I want to default shell to be <tt>/bin/bash</tt> </itemize> To make these changes I would use: <tscreen><verb>useradd -D -g100 -e60 -f0 -s/bin/bash</verb></tscreen> %--> 내 system에서는: <itemize> <item>기본 group은 100이다. <item>password는 60일마다 한번씩 바꾼다. <item>password가 취소될 수 있으므로 계정이 고정되지 않기를 바란다. <item>기본 shell은 <tt>/bin/bash</tt>이다. </itemize> 이렇게 바꾸기 위해서: <tscreen><verb>useradd -D -g100 -e60 -f0 -s/bin/bash</verb></tscreen> <p> <!--% Now running <tt>useradd -D</tt> will give: %--> 이제 <tt>useradd -D</tt>를 치면: <code> GROUP=100 HOME=/home INACTIVE=0 EXPIRE=60 SHELL=/bin/bash SKEL=/etc/skel </code> <p> <!--% Just in case you wanted to know, these defaults are stored in the file <tt>/etc/default/useradd</tt>. %--> 이러한 기본치들은 <tt>/etc/default/useradd</tt>에 저장된다. <p> <!--% Now you can use <tt>useradd</tt> to add users to the system. For example, to add the user <tt>fred</tt>, using the defaults, you would use the following: <tscreen><verb>useradd -m -c "Fred Flintstone" fred</verb></tscreen> This will create the following entry in the <tt>/etc/passwd</tt> file: <tscreen><verb>fred:*:505:100:Fred Flintstone:/home/fred:/bin/bash</verb></tscreen> And the following entry in the <tt>/etc/shadow</tt> file: <tt>fred</tt>'s home directory will be created and the contents of <tt>/etc/skel</tt> will be copied there because of the <tt>-m</tt> switch. %--> 이제 <tt>useradd</tt>를 써서 system에 사용자를 추가할 수 있다. 예를 들어, <tt>fred</tt>라는 사용자를 기본치만 적용해서 추가한다면: <tscreen><verb>useradd -m -c "Fred Flintstone" fred</verb></tscreen> <tt>/etc/passwd</tt> file에 다음과 같은 명부(?)가 생성된다: <tscreen><verb>fred:*:505:100:Fred Flintstone:/home/fred:/bin/bash</verb></tscreen> 그리고, <tt>/etc/shadow</tt> file에는: <tscreen><verb>fred:!:0:0:60:0:0:0:0</verb></tscreen> <tt>fred</tt>의 home directory가 만들어지고, <tt>-m</tt> switch가 쓰였으므로 <tt>/etc/skel</tt> 전체가 그 곳으로 복사된다. <p> <!--% Also, since we did not specify a UID, the next available one was used. %--> 또한, 특별히 UID를 지정하지 않았으로, 이미 사용된 UID 다음 것이 쓰였다. <p> <!--% <tt>fred</tt>'s account is created, but <tt>fred</tt> still won't be able to login until we unlock the account. We do this by changing the password. %--> <tt>fred</tt>의 계정이 생겼으나, 우리가 계정을 풀어주기 전까지는 <tt>fred</tt>는 login할 수 없다. 계정을 풀어주기 위해서는 password를 바꾸어 주어야 한다. <tscreen><verb>passwd fred</verb></tscreen> <code> Changing password for fred Enter the new password (minimum of 5 characters) Please use a combination of upper and lower case letters and numbers. New Password: ******* Re-enter new password: ******* </code> <!--% Now the <tt>/etc/shadow</tt> will contain: <tscreen><verb>fred:J0C.WDR1amIt6:9559:0:60:0:0:0:0</verb></tscreen> And <tt>fred</tt> will now be able to login and use the system. The nice thing about <tt>useradd</tt> and the other programs that come with the <em>Shadow Suite</em> is that they make changes to the <tt>/etc/passwd</tt> and <tt>/etc/shadow</tt> files atomically. So if you are adding a user, and another user is changing their password at the same time, both operations will be performed correctly. %--> 이제 <tt>/etc/shadow</tt>는 다음과 같을 것이다: <tscreen><verb>fred:J0C.WDR1amIt6:9559:0:60:0:0:0:0</verb></tscreen> 그리고, <tt>fred</tt>는 login해서 system을 사용할 수 있다. <em>Shadow Suite</em>에 있는 다른 program들과 같이 <tt>useradd</tt>가 좋은 점은 <tt>/etc/passwd</tt>와 <tt>/etc/shadow</tt> file의 내용을 바꿀 때 방해받지 않는다는 점이다. 따라서 동시에 당신은 사용자를 추가하고, 다른 이용자는 자신의 password를 바꾼다해도, 둘 다 제대로 이행된다. (역자주: mutex lock, race condition같은 걸 생각하면 될 것같습니다.) <p> <!--% You should use the supplied commands rather than directly editing <tt>/etc/passwd</tt> and <tt>/etc/shadow</tt>. If you were editing the <tt>/etc/shadow</tt> file, and a user were to change his password while you are editing, and then you were to save the file you were editing, the user's password change would be lost. %--> <tt>/etc/passwd</tt>, <tt>/etc/shadow</tt>를 직접 편집하는 것보다 이런 명령을 쓰는 것이 더 좋다. 만일 당신이 <tt>/etc/shadow</tt> file을 편집하고 있고, 그 와중에 한 사용자가 password를 바꾸고, 그리고나서 당신이 편집을 끝내고 저장하면, 그 사용자가 한 일을 잃어버리게 된다. <p> <!--% Here is a small interactive script that adds users using <tt>useradd</tt> and <tt>passwd</tt>: <code> #!/bin/bash # # /sbin/newuser - A script to add users to the system using the Shadow # Suite's useradd and passwd commands. # # Written by Mike Jackson <mhjack@tscnet.com> as an example for the Linux # Shadow Password Howto. Permission to use and modify is expressly granted. # # This could be modified to show the defaults and allow modification similar # to the Slackware Adduser program. It could also be modified to disallow # stupid entries. (i.e. better error checking). # ## # Defaults for the useradd command ## GROUP=100 # Default Group HOME=/home # Home directory location (/home/username) SKEL=/etc/skel # Skeleton Directory INACTIVE=0 # Days after password expires to disable account (0=never) EXPIRE=60 # Days that a passwords lasts SHELL=/bin/bash # Default Shell (full path) ## # Defaults for the passwd command ## PASSMIN=0 # Days between password changes PASSWARN=14 # Days before password expires that a warning is given ## # Ensure that root is running the script. ## WHOAMI=`/usr/bin/whoami` if [ $WHOAMI != "root" ]; then echo "You must be root to add news users!" exit 1 fi ## # Ask for username and fullname. ## echo "" echo -n "Username: " read USERNAME echo -n "Full name: " read FULLNAME # echo "Adding user: $USERNAME." # # Note that the "" around $FULLNAME is required because this field is # almost always going to contain at least on space, and without the "'s # the useradd command would think that you we moving on to the next # parameter when it reached the SPACE character. # /usr/sbin/useradd -c"$FULLNAME" -d$HOME/$USERNAME -e$EXPIRE \ -f$INACTIVE -g$GROUP -m -k$SKEL -s$SHELL $USERNAME ## # Set password defaults ## /bin/passwd -n $PASSMIN -w $PASSWARN $USERNAME >/dev/null 2>&1 ## # Let the passwd command actually ask for password (twice) ## /bin/passwd $USERNAME ## # Show what was done. ## echo "" echo "Entry from /etc/passwd:" echo -n " " grep "$USERNAME:" /etc/passwd echo "Entry from /etc/shadow:" echo -n " " grep "$USERNAME:" /etc/shadow echo "Summary output of the passwd command:" echo -n " " passwd -S $USERNAME echo "" </code> %--> 여기에 <tt>useradd</tt>와 <tt>passwd</tt>를 사용한 간단한 대화형 script가 있다: <code> #!/bin/bash # # /sbin/newuser - Shadow Suite의 useradd와 passwd 명령을 이용해서 # 사용자를 추가하는 script # # Linux Shadow Password Howto의 예제로써 Mike Jackson <mhjack@tscnet.com>에 # 의해 작성됐음. 사용과 수정을 특별히 허가함. # # 이 것은 Slackware의 Adduser program처럼 기본치를 보여주고, 수정할 수 있도록 # 바꿀 수 있었다. 또한 멍청한 입력을 거부하도록 바뀔 수 있었다. # (즉, 더 나은 오류 검사등...) # ## # useradd 명령의 기본 설정치들 ## GROUP=100 # 기본 Group HOME=/home # Home directory 위치 (/home/username) SKEL=/etc/skel # Skeleton(공통적인 내용을 지닌 file들?) Directory INACTIVE=0 # password가 기한이 지난 뒤 사용자 계정이 무효가 # 되기까지의 기간 (0=그렇게 하고 싶지 않음) EXPIRE=60 # password 유효기간 SHELL=/bin/bash # 기본 Shell (full path) ## # passwd 명령의 기본 설정치들 ## PASSMIN=0 # password를 바꾼다음 또 바꾸기 위한 유예기간 PASSWARN=14 # password의 기한이 지나기전에 경고하는 기간 ## # script를 실행하는 사용자가 root인지 확인 ## WHOAMI=`/usr/bin/whoami` if [ $WHOAMI != "root" ]; then echo "You must be root to add news users!" exit 1 fi ## # 사용자 ID(username)와 실제 이름(Full name) 묻기 ## echo "" echo -n "Username: " read USERNAME echo -n "Full name: " read FULLNAME # echo "Adding user: $USERNAME." # # $FULLNAME 주변에 ""가 필요하다는 것에 주의할 것. 이유는 이 field는 # 반드시 공란이상의 무엇인가를 포함하며, "를 없이 useradd command를 # 실행시킨다면, 다음에 이어지는 parameter들도 그 field에 일부분으로 # 인식된다. # /usr/sbin/useradd -c"$FULLNAME" -d$HOME/$USERNAME -e$EXPIRE \ -f$INACTIVE -g$GROUP -m -k$SKEL -s$SHELL $USERNAME ## # password에 대한 기본 설정치를 정한다. ## /bin/passwd -n $PASSMIN -w $PASSWARN $USERNAME >/dev/null 2>&1 ## # passwd를 실행시켜 password를 입력받는다. ## /bin/passwd $USERNAME ## # 결과를 보여줌. ## echo "" echo "Entry from /etc/passwd:" echo -n " " grep "$USERNAME:" /etc/passwd echo "Entry from /etc/shadow:" echo -n " " grep "$USERNAME:" /etc/shadow echo "Summary output of the passwd command:" echo -n " " passwd -S $USERNAME echo "" </code> <p> <!--% Using a script to add new users is really much more preferable than editing the <tt>/etc/passwd</tt> or <tt>/etc/shadow</tt> files directly or using a program like the Slackware <tt>adduser</tt> program. Feel free to use and modify this script for your particular system. %--> 새로운 사용자를 추가하는 데 script를 쓰는 것은 <tt>/etc/passwd</tt>와 <tt>/etc/shadow</tt>를 직접 편집하는 거나 Slackware의 <tt>adduser</tt>를 쓰는 것보다 훨 낫다. 당신의 특별한 system에 알맞로록 자유롭게 고치기 바란다. <p> <!--% For more information on the <tt>useradd</tt> see the online manual page. %--> <tt>useradd</tt>에 대한 자세한 정보는 manual page를 보시길... <sect2><heading>usermod <p> <!--% The <tt>usermod</tt> program is used to modify the information on a user. The switches are similar to the <tt>useradd</tt> program. %--> <tt>usermod</tt>는 사용자에 대한 정보를 고친다. option은 <tt>useradd</tt>와 비슷하다. <p> <!--% Let's say that you want to change <tt>fred</tt>'s shell, you would do the following: <tscreen><verb>usermod -s /bin/tcsh fred</verb></tscreen> Now <tt>fred</tt>'s <tt>/etc/passwd</tt> file entry would be change to this: <tscreen><verb>fred:*:505:100:Fred Flintstone:/home/fred:/bin/tcsh</verb></tscreen> Let's make <tt>fred</tt>'s account expire on 09/15/97: <tscreen><verb>usermod -e 09/15/97 fred</verb></tscreen> Now <tt>fred</tt>'s entry in <tt>/etc/shadow</tt> becomes: <tscreen><verb>fred:J0C.WDR1amIt6:9559:0:60:0:0:10119:0</verb></tscreen> %--> 앞의 <tt>fred</tt>의 shell을 바꾸고 싶으면, 다음과 같이 입력한다: <tscreen><verb>usermod -s /bin/tcsh fred</verb></tscreen> 이제 <tt>fred</tt>의 <tt>/etc/passwd</tt> file에 있는 내용은 다음처럼 바뀌어 있다: <tscreen><verb>fred:*:505:100:Fred Flintstone:/home/fred:/bin/tcsh</verb></tscreen> 이번에는 <tt>fred</tt>의 계정이 97년 9월 15일까지만 쓰도록 하자: <tscreen><verb>usermod -e 09/15/97 fred</verb></tscreen> 그러면 <tt>fred</tt>의 <tt>/etc/shadow</tt> file에 있는 내용은: <tscreen><verb>fred:J0C.WDR1amIt6:9559:0:60:0:0:10119:0</verb></tscreen> <p> <!--% For more information on the <tt>usermod</tt> command see the online manual page. %--> <tt>usermod</tt>에 대한 자세한 정보는 manual page를... <sect2><heading>userdel <p> <!--% <tt>userdel</tt> does just what you would expect, it deletes the user's account. You simply use: <tscreen><verb>userdel -r username</verb></tscreen> The <tt>-r</tt> causes all files in the user's home directory to be removed along with the home directory itself. Files located in other file system will have to be searched for and deleted manually. %--> <tt>userdel</tt>는 정확히 당신이 원한 것 - 사용자 계정 죽이기 - 를 해치운다. <tscreen><verb>userdel -r username</verb></tscreen> 라고 치면 된다. <tt>-r</tt>은 사용자의 home directory에 있는 모든 file들과 함께 directory 자체를 지운다. 다른 곳에 있는 file들은 일일이 찾아서 지워야 한다. <p> <!--% If you want to simply lock the account rather than delete it, use the <tt>passwd</tt> command instead. %--> 삭제보다 계정을 쓰지 못하게 할 거라면, <tt>passwd</tt> 명령을 쓰기 바란다. <!--% <sect1><heading>The passwd command and passwd aging. %--> <sect1><heading>passwd 명령과 passwd 수명 정하기. <p> <!--% The <tt>passwd</tt> command has the obvious use of changing passwords. Additionally, it is used by the <em>root</em> user to: <itemize> <item>Lock and unlock accounts (<tt>-l</tt> and <tt>-u</tt>) <item>Set the maximum number of days that a password remains valid (<tt>-x</tt>) <item>Set the minimum days between password changes (<tt>-n</tt>) <item>Sets the number of days of warning that a password is about to expire (<tt>-w</tt>) <item>Sets the number of days after the password expires before the account is locked (<tt>-i</tt>) <item>Allow viewing of account information in a clearer format (<tt>-S</tt>) </itemize> %--> <tt>passwd</tt>는 말 그대로 password를 바꾸는 데 사용된다. 더우기, <em>root</em>는 다음과 같은 일을 할 수 있다: <itemize> <item>계정 잠금(lock)과 풀림(unlock)(<tt>-l</tt>와 <tt>-u</tt>) <item>password 유효기간(<tt>-x</tt>) <item>password를 다시 바꾸기 위해 기다려야 하는 기간(<tt>-n</tt>) <item>password 유효기간 만료임을 알리는 경고는 몇일전에 할 것인가(<tt>-w</tt>) <item>password 유효기간이 지난 뒤 계정을 잠그기(lock)하기까지의 기간(<tt>-i</tt>) <item>계정에 대한 정보를 더 자세히 보는 것을 허용함(<tt>-S</tt>) </itemize> <p> <!--% For example, let look again at <tt>fred</tt> <tscreen><verb>passwd -S fred fred P 03/04/96 0 60 0 0</verb></tscreen> This means that <tt>fred</tt>'s password is valid, it was last changed on 03/04/96, it can be changed at any time, it expires after 60 days, fred will not be warned, and and the account won't be disabled when the password expires. %--> 다시 <tt>fred</tt>의 예로 돌아가면 <tscreen><verb>passwd -S fred fred P 03/04/96 0 60 0 0</verb></tscreen> 이것은 <tt>fred</tt>의 password가 유효하고, 96년 3월 4일에 마지막으로 바꾸었고, 언제든지 바꿀 수 있다. 그리고, 60일동안 password를 바꾸지 않으면 그후에는 못쓰고, 그 이전에 fred는 아무런 경고를 받지 않을 것이며, password를 못쓰더라도 계정은 유효하다. <p> <!--% This simply means that if <tt>fred</tt> logs in after the password expires, he will be prompted for a new password at login. %--> 즉, <tt>fred</tt>의 password가 무효가 된 뒤 들어오면, 새로운 password를 재촉받을 것이다. <p> <!--% If we decide that we want to warn <tt>fred</tt> 14 days before his password expires and make his account inactive 14 days after he lets it expire, we would need to do the following: <tscreen><verb>passwd -w14 -i14 fred</verb></tscreen> Now <tt>fred</tt> is changed to: <tscreen><verb>fred P 03/04/96 0 60 14 14</verb></tscreen> For more information on the <tt>passwd</tt> command see the online manual page. %--> <tt>fred</tt>에게 password가 취소되기 14일전에 경고를 하고, 취소된 뒤 14일후 그의 계정을 동결시키려면: <tscreen><verb>passwd -w14 -i14 fred</verb></tscreen> 그러면 다음처럼 <tt>fred</tt>에 대한 내용이 바뀐다: <tscreen><verb>fred P 03/04/96 0 60 14 14</verb></tscreen> <tt>passwd</tt>에 대한 자세한 정보는 manual page에... <sect1><heading>The login.defs file. <p> <!--% The file <tt>/etc/login</tt> is the configuration file for the <tt>login</tt> program and also for the <em>Shadow Suite</em> as a whole. %--> <tt>/etc/login</tt> file은 <tt>login</tt> program, 전체적으로 <em>Shadow Suite</em>에 대한 설정을 담고 있다. <p> <!--% <tt>/etc/login</tt> contains settings from what the prompts will look like to what the default expiration will be when a user changes his password. %--> <tt>/etc/login</tt>은 prompt가 어떤 모습을 하고 있는 가부터 사용자가 password를 바꾸면 기본 유효기간은 어떻게 될 것인가에 대한 설정까지 담고 있다. <p> <!--% The <tt>/etc/login.defs</tt> file is quite well documented just by the comments that are contained within it. However, there are a few things to note: <itemize> <item>It contains flags that can be turned on or off that determine the amount of logging that takes place. <item>It contains pointers to other configuration files. <item>It contains defaults assignments for things like password aging. </itemize> %--> <tt>/etc/login.defs</tt> file은 내부에 있는 수많은 comment들로 잘 문서화되어 있다. 있는 것을 간단히 설명하면: <itemize> <item>발생하는 log의 양(?)을 결정하는 on/off방식의 flag들. <item>다른 설정 file을 가리키는 pointer들. <item>password 유효기간 설정같은 기본 설정치들. </itemize> <p> <!--% From the above list you can see that this is a rather important file, and you should make sure that it is present, and that the settings are what you desire for your system. %--> 위에서 보듯 이 놈은 상당히 중요한 file이다. 따라서, 지금 있는지 확인하고, system과 당신 취향에 맞는 지 점검할 것. <sect1><heading>Group passwords. <p> <!--% The <tt>/etc/groups</tt> file may contain passwords that permit a user to become a member of a particular group. This function is enabled if you define the constant <tt>SHADOWGRP</tt> in the <tt>/usr/src/shadow-YYMMDD/config.h</tt> file. %--> <tt>/etc/groups</tt> file은 사용자가 특정 group의 회원이 될 수 있도록 허용하는 password를 담고 있다. 이 기능은 <tt>/usr/src/shadow-YYMMDD/config.h</tt>의 <tt>SHADOWGRP</tt> 상수를 정의할 경우 작동된다. <p> <!--% If you define this constant and then compile, you must create an <tt>/etc/gshadow</tt> file to hold the group passwords and the group administrator information. %--> 만일 이 기능을 쓴다면, <tt>/etc/gshadow</tt> file을 만들어, group password와 group 관리자에 대한 정보를 담을 수 있도록 하라. <p> <!--% When you created the <tt>/etc/shadow</tt>, you used a program called <tt>pwconv</tt>, there no equivalent program to create the <tt>/etc/gshadow</tt> file, but it really doesn't matter, it takes care of itself. %--> <tt>/etc/shadow</tt>를 만들 때, 당신은 <tt>pwconv</tt>를 썼지만, <tt>/etc/gshadow</tt>를 만드는 데에는 그런 program이 없다. 하지만 걱정말라. 알아서 하니까. <p> <!--% To create the initial <tt>/etc/gshadow</tt> file do the following: %--> 처음 <tt>/etc/gshadow</tt>를 만들기 위해서 다음처럼 해라: <tscreen><verb>touch /etc/gshadow chown root.root /etc/gshadow chmod 700 /etc/gshadow</verb></tscreen> <p> <!--% Once you create new groups, they will be added to the <tt>/etc/group</tt> and the <tt>/etc/gshadow</tt> files. If you modify a group by adding or removing users or changing the group password, the <tt>/etc/gshadow</tt> file will be changed. %--> 당신이 새로운 group을 만든다면, 자동적으로 <tt>/etc/group</tt>와 <tt>/etc/gshadow</tt> file에 그들이 덧붙여진다. group에 사용자를 추가하거나 삭제, 또는 group password를 바꾸면, <tt>/etc/gshadow</tt> file은 따라서 바뀔 것이다. <p> <!--% The programs <tt>groups</tt>, <tt>groupadd</tt>, <tt>groupmod</tt>, and <tt>groupdel</tt> are provided as part of the <em>Shadow Suite</em> to modify groups. %--> <tt>groups</tt>, <tt>groupadd</tt>, <tt>groupmod</tt>, <tt>groupdel</tt> program이 group을 고치는 도구로써 <em>Shadow Suite</em>에 포함되어 공급된다. <p> <!--% The format of the <tt>/etc/group</tt> file is as follows: <tscreen><verb>groupname:!:GID:member,member,...</verb></tscreen> Where: <descrip> <tag/<tt>groupname</tt></tag> The name of the group <tag/<tt>!</tt></tag> The field that normally holds the password, but that is now relocated to the <tt>/etc/gshadow</tt> file. <tag/<tt>GID</tt></tag> The numerical group ID number <tag/<tt>member</tt></tag> List of group members </descrip> %--> <tt>/etc/group</tt> file의 형식은 다음과 같다: <tscreen><verb>groupname:!:GID:member,member,...</verb></tscreen> 각 요소는: <descrip> <tag/<tt>groupname</tt></tag> group 이름 <tag/<tt>!</tt></tag> 이 field는 password란이지만 <tt>/etc/gshadow</tt> file로 옮겨졌다. <tag/<tt>GID</tt></tag> group ID number <tag/<tt>member</tt></tag> group member의 list </descrip> 이다. <p> <!--% The format of the <tt>/etc/gshadow</tt> file is as follows: <tscreen><verb>groupname:password:admin,admin,...:member,member,...</verb></tscreen> Where: <descrip> <tag/<tt>groupname</tt></tag> The name of the group <tag/<tt>password</tt></tag> The encoded group password. <tag/<tt>admin</tt></tag> List of group administrators <tag/<tt>member</tt></tag> List of group members </descrip> %--> <tt>/etc/gshadow</tt> file 의 형식은 다음과 같다: <tscreen><verb>groupname:password:admin,admin,...:member,member,...</verb></tscreen> 각 요소는: <descrip> <tag/<tt>groupname</tt></tag> group 이름 <tag/<tt>password</tt></tag> encode된 group password. <tag/<tt>admin</tt></tag> group 관리자 list <tag/<tt>member</tt></tag> group member list </descrip> 이다. <p> <!--% The command <tt>gpasswd</tt> is used only for adding or removing administrators and members to or from a group. <tt>root</tt> or someone in the list of administrators may add or remove group members. %--> <tt>gpasswd</tt> 명령은 group의 사용자나 관리자를 추가, 또는 삭제할 때 쓴다. <tt>root</tt>또는 관리자만이 group member를 추가, 삭제할 수 있다. <p> <!--% The groups password can be changed using the <tt>passwd</tt> command by <em>root</em> or anyone listed as an administrator for the group. %--> group password는 <em>root</em>나 group 관리자에 의해 <tt>passwd</tt> 명령으로 바꿀 수 있다. <p> <!--% Despite the fact that there is not currently a manual page for <tt>gpasswd</tt>, typing <tt>gpasswd</tt> without any parameters gives a listing of options. It's fairly easy to grasp how it all works once you understand the file formats and the concepts. %--> <tt>gpasswd</tt>에 대한 manual page가 현재 제공되어 있지 않지만, 아무런 parameter없이 <tt>gpasswd</tt>를 치면 option에 대한 list가 나오므로, file format과 개념만 잘 이해하면 사용법을 쉽게 익힐 수 있다. <!--% <sect1><heading>Consistency checking programs %--> <sect1><heading>일관성 점검 program들 <p> <sect2><heading>pwck <p> <!--% The program <tt>pwck</tt> is provided to provide a consistency check on the <tt>/etc/passwd</tt> and <tt>/etc/shadow</tt> files. It will check each username and verify that it has the following: <itemize> <item>the correct number of fields <item>unique user name <item>valid user and group identifier <item>valid primary group <item>valid home directory <item>valid login shell </itemize> %--> <tt>pwck</tt> program은 <tt>/etc/passwd</tt>와 <tt>/etc/shadow</tt> file간에 틀린 점이 없는 지 점검한다. 이 것은 각각 사용자에 대해 다음과 같은 사항을 점검한다: <itemize> <item>field의 갯수는 맞는가 <item>사용자 이름은 유일한가 <item>사용자와 group id <item>기본 group <item>home directory <item>login shell </itemize> <p> <!--% It will also warn of any account that has no password. %--> 또한, password가 없는 계정에 대해 경고를 준다. <p> <!--% It's a good idea to run <tt>pwck</tt> after installing the <em>Shadow Suite</em>. It's also a good idea to run it periodically, perhaps weekly or monthly. If you use the <tt>-r</tt> option, you can use <tt>cron</tt> to run it on a regular basis and have the report mailed to you. %--> <em>Shadow Suite</em>을 깐 뒤, <tt>pwck</tt>를 실행시키는 것은 좋은 생각이다. 주나 월단위등 주기적으로 실행시키기를 권한다. <tt>-r</tt> option을 쓴다면, <tt>cron</tt>으로 하여금 정기적으로 실행하고 결과를 보고하도록 할 수 있다. <sect2><heading>grpck <p> <!--% <tt>grpck</tt> is the consistency checking program for the <tt>/etc/group</tt> and <tt>/etc/gshadow</tt> files. It performs the following checks: <itemize> <item>the correct number of fields <item>unique group name <item>valid list of members and administrators </itemize> %--> <tt>grpck</tt> program은 <tt>/etc/group</tt>와 <tt>/etc/gshadow</tt> file간에 틀린 점이 없는 지 점검한다. 이것은 다음과 같은 사항을 점검한다: <itemize> <item>field의 갯수는 맞는가 <item>사용자 이름은 유일한가 <item>사용자와 관리자의 list가 맞는가 </itemize> <p> <!--% It also has the <tt>-r</tt> option for automated reports. %--> 자동 보고서를 위해 <tt>-r</tt> option이 있다. <sect1><heading>Dial-up passwords. <p> <!--% Dial-up passwords are another optional line of defense for systems that allow dial-in access. If you have a system that allows many people to connect locally or via a network, but you want to limit who can dial in and connect, then dial-up passwords are for you. To enable dial-up passwords, you must edit the file <tt>/etc/login.defs</tt> and ensure that <tt>DIALUPS_CHECK_ENAB</tt> is set to <tt>yes</tt>. %--> Dial-up password는 전화접속을 허용하는 system에게는 또 하나의 방어선이다. 당신은 직접이든 network를 통해서건 많은 사람들이 system에 접속하게 할 수 있지만, 전화접속을 할 수 있는 사람을 제한하고 싶다면, dial-up password는 좋은 해결책이다. dial-up password를 쓰고 싶다면, <tt>/etc/login.defs</tt>의 <tt>DIALUPS_CHECK_ENAB</tt>를 <tt>yes</tt>로 바꾸면 된다. <p> <!--% Two files contain the dial-up information, <tt>/etc/dialups</tt> which contains the ttys (one per line, with the leading "/dev/" removed). If a tty is listed then dial-up checks are performed. %--> 두 file이 전화접속에 대한 정보를 담고 있다. <tt>/etc/dialups</tt>는 ttys에 대한 내용이다 ("/dev/"는 제거된 채로 line당 하나씩). tty가 list에 올라와있다면 dial-up 검사가 수행된다(?). <p> <!--% The second file is the <tt>/etc/d_passwd</tt> file. This file contains the fully qualified path name of a shell, followed by an optional password. %--> 두번째는 <tt>/etc/d_passwd</tt>이다. 이 file에는 password와 shell의 완전한 pathname이 들어 있다. <p> <!--% If a user logs into a line that is listed in <tt>/etc/dialups</tt>, and his shell is listed in the file <tt>/etc/d_passwd</tt> he will be allowed access only by suppling the correct password. %--> tty를 통해서 log하는 사용자가 <tt>/etc/dialups</tt>에, 그의 shell이 <tt>/etc/d_passwd</tt>에 있다면, 그는 제대로 password만 입력하면 된다. <p> <!--% Another useful purpose for using dial-up passwords might be to setup a line that only allows a certain type of connect (perhaps a PPP or UUCP connection). If a user tries to get another type of connection (i.e. a list of shells), he must know a password to use the line. %--> dial-up password의 또 다른 이용법는 한 line에 어떤 접속 유형(대개 PPP나 UUCP 접속)을 허용할 것인가를 정하는 것이다. 사용자가 다른 유형의 접속(특히, 일련의 shell로써)을 시도하고자 한다면, line을 사용할 수 있는 password를 알고 있어야 한다. <p> <!--% Before you can use the dial-up feature, you must create the files. %--> dial-up 기능을 사용하기 전에, file들을 만들어야 한다. <p> <!--% The command <tt>dpasswd</tt> is provided to assign passwords to the shells in the <tt>/etc/d_passwd</tt> file. See the manual page for more information. %--> <tt>dpasswd</tt> 명령은 password와 <tt>/etc/d_passwd</tt>에 있는 shell을 연결해준다. 자세한 정보는 manual page에... <!--% <sect><heading>Adding shadow support to a C program<label id="sec-adding"> %--> <sect><heading>C program에 Shadow를 지원하도록 덧붙이기<label id="sec-adding"> <p> <!--% Adding shadow support to a program is actually fairly straightforward. The only problem is that the program must be run by root (or SUID root) in order for the the program to be able to access the <tt>/etc/shadow</tt> file. %--> C program에 Shadow를 지원하도록 덧붙이는 것은 실제적으로 매우 간단하다. 단지 문제는 <tt>/etc/shadow</tt> file에 접근하기 위해서는 program이 root(또는 SUID root)로 실행되어야 한다는 것이다. <p> <!--% This presents one big problem: very careful programming practices must be followed when creating SUID programs. For instance, if a program has a shell escape, this must not occur as root if the program is SUID root. %--> 이 것은 커다란 문제 하나를 우리에게 강요한다: SUID program을 만들 때, 매우 조심스럽게 programming하는 습관이 되어 있어야 한다. 예를 들어, program이 shell 탈출기능을 가지고 있고 이 program이 SUID root라면, 이 기능이 root 권한을 주어서는 안된다. <p> <!--% For adding shadow support to a program so that it can check passwords, but otherwise does need to run as root, it's a lot safer to run the program SUID shadow instead. The <tt>xlock</tt> program is an example of this. %--> password를 검사해 할 수 있지만 다른 경우는 root권한으로 실행할 필요가 없는 program에 shadow 지원 기능을 덧붙임으로써, SUID program보다 훨씬 안전한 program을 만들 수 있게 한다. <tt>xlock</tt> program이 그 한 예이다. <p> <!--% In the example given below, <tt>pppd-1.2.1d</tt> already runs SUID as root, so adding shadow support should not make the program any more vulnerable. %--> 아래 예에서, <tt>pppd-1.2.1d</tt>는 이미 SUID root로 실행하고 있으므로, shadow 지원 기능을 덧붙이는 것은 program이 더 취약하게 만들지 않을 것이다. <sect1><heading>Header files <p> <!--% The header files should reside in <tt>/usr/include/shadow</tt>. There should also be a <tt>/usr/include/shadow.h</tt>, but it will be a symbolic link to <tt>/usr/include/shadow/shadow.h</tt>. %--> header file들은 <tt>/usr/include/shadow</tt>에 있다. 또한, <tt>/usr/include/shadow.h</tt>도 있다. 그러나, 이것은 <tt>/usr/include/shadow/shadow.h</tt>에 대한 symbolic link일 것이다. <p> <!--% To add shadow support to a program, you need to include the header files: %--> shadow 지원 기능을 추가하기 위해, header file을 넣자: <verb> #include <shadow/shadow.h> #include <shadow/pwauth.h> </verb> <p> <!--% It might be a good idea to use compiler directives to conditionally compile the shadow code (I do in the example below). %--> shadow code를 상황에 따라 compile하도록 compiler directive(지시자)를 쓰는 것은 종은 방법이다 (아래 예에서 보도록). <sect1><heading>libshadow.a library <p> <!--% When you installed the <em>Shadow Suite</em> the <tt>libshadow.a</tt> file was created and installed in <tt>/usr/lib</tt>. %--> <em>Shadow Suite</em>을 설치할 때, <tt>libshadow.a</tt> file은 <tt>/usr/lib</tt>에 놓인다. <p> <!--% When compiling shadow support into a program, the linker needs to be told to include the <tt>libshadow.a</tt> library into the link. %--> shadow 지원기능을 program에 넣을려면, linker에게 <tt>libshadow.a</tt>를 같이 link하도록 지시해주어야 한다. <p> <!--% This is done by: %--> 다음처럼: <tscreen><verb>gcc program.c -o program -lshadow</verb></tscreen> <p> <!--% However, as we will see in the example below, most large programs use a <tt>Makefile</tt>, and usually have a variable called <tt>LIBS=...</tt> that we will modify. %--> 어쨌든, 아래 예에서 보다시피, 대부분 거대한 program들은 <tt>Makefile</tt>을 사용하고, 우리가 고칠 <tt>LIBS=...</tt>라는 변수를 대개 쓴다. <!--% <sect1><heading>Shadow Structure %--> <sect1><heading>Shadow 구조체 <p> <!--% The <tt>libshadow.a</tt> library uses a structure called <tt>spwd</tt> for the information it retrieves from the <tt>/etc/shadow</tt> file. This is the definition of the <tt>spwd</tt> structure from the <tt>/usr/include/shadow/shadow.h</tt> header file: <code> struct spwd { char *sp_namp; /* login name */ char *sp_pwdp; /* encrypted password */ sptime sp_lstchg; /* date of last change */ sptime sp_min; /* minimum number of days between changes */ sptime sp_max; /* maximum number of days between changes */ sptime sp_warn; /* number of days of warning before password expires */ sptime sp_inact; /* number of days after password expires until the account becomes unusable. */ sptime sp_expire; /* days since 1/1/70 until account expires */ unsigned long sp_flag; /* reserved for future use */ }; </code> %--> <tt>libshadow.a</tt> library는 <tt>/etc/shadow</tt> file로부터 얻는 정보를 <tt>spwd</tt>라는 구조체에 담는다. <tt>spwd</tt> 구조체에 대한 정의는 <tt>/usr/include/shadow/shadow.h</tt> file에 있다: <code> struct spwd { char *sp_namp; /* 사용자 이름 */ char *sp_pwdp; /* encrypt된 password */ sptime sp_lstchg; /* 최근 data 수정일 */ sptime sp_min; /* 수정작업간의 최소 날짜(결국 한번 수정한 다음 언제 수정이 가능한가에 대한 대답) */ sptime sp_max; /* 수정작업간의 최대 날짜(password 유효기간) */ sptime sp_warn; /* password가 무효가 되기 전 경고하는 기간 */ sptime sp_inact; /* password가 무효된 뒤, 계정이 사용불능이 될 때까지의 기간. */ sptime sp_expire; /* 날짜(계정사용불능 - 1/1/70) */ unsigned long sp_flag; /* 나중을 위해 비워둠 */ }; </code> <p> <!--% The <em>Shadow Suite</em> can put things into the <tt>sp_pwdp</tt> field besides just the encoded passwd. The password field could contain: <tscreen><verb>username:Npge08pfz4wuk;@/sbin/extra:9479:0:10000::::</verb></tscreen> %--> <em>Shadow Suite</em>는 <tt>sp_pwdp</tt> field에 encode된 passwd와 함께 다른 걸 넣을 수 있다. password field는 다음처럼 될 수 있다: <tscreen><verb>username:Npge08pfz4wuk;@/sbin/extra:9479:0:10000::::</verb></tscreen> <p> <!--% This means that in addition to the password, the program <tt>/sbin/extra</tt> should be called for further authentication. The program called will get passed the username and a switch that indicates why it's being called. See the file <tt>/usr/include/shadow/pwauth.h</tt> and the source code for <tt>pwauth.c</tt> for more information. %--> 이는 password에 덧붙여, <tt>/sbin/extra</tt> program이 더 심화된 인증을 위해 호출된다는 것을 의미한다. 호출되는 program은 username, 호출이유를 알려주는 switch를 받을 수 있어야 될 것이다. 자세한 걸 알고 싶다면, <tt>/usr/include/shadow/pwauth.h</tt>와 <tt>pwauth.c</tt>를 보기 바란다. <p> <!--% What this means is that we should use the function <tt>pwauth</tt> to perform the actual authentication, as it will take care of the secondary authentication as well. The example below does this. %--> 이것이 의도하는 바는 -두번 사용자 확인하는 데 사용할 수도 있는- 다른 현존하는(actual) 사용자 확인 방법을 수행할 수 있도록 <tt>pwauth</tt> 기능을 쓰는 것이다. <p> <!--% The author of the <em>Shadow Suite</em> indicates that since most programs in existence don't do this, and that it may be removed or changed in future versions of the <em>Shadow Suite</em>. %--> <em>Shadow Suite</em>의 저자는 현존하는 대부분의 program들이 이 기능을 쓰고 있지 않음은 지적하면서, <em>Shadow Suite</em> 차기 version에는 사라지거나, 바뀔 것이라고 한다. <!--% <sect1><heading>Shadow Functions %--> <sect1><heading>Shadow 함수들 <p> <!--% The <tt>shadow.h</tt> file also contains the function prototypes for the functions contained in the <tt>libshadow.a</tt> library: %--> <tt>shadow.h</tt> file은 <tt>libshadow.a</tt> library에 있는 함수들의 기본형을 포함하고 있다: <code> extern void setspent __P ((void)); extern void endspent __P ((void)); extern struct spwd *sgetspent __P ((__const char *__string)); extern struct spwd *fgetspent __P ((FILE *__fp)); extern struct spwd *getspent __P ((void)); extern struct spwd *getspnam __P ((__const char *__name)); extern int putspent __P ((__const struct spwd *__sp, FILE *__fp)); </code> <p> <!--% The function that we are going to use in the example is: <tt>getspnam</tt> which will retrieve for us a <tt>spwd</tt> structure for the supplied name. %--> 예제에서 쓸 함수는: <tt>getspnam</tt> - <tt>spwd</tt> 구조체에서 사용자 이름을 가져오는 함수 - 이다. <sect1><heading>Example <p> <!--% This is an example of adding shadow support to a program that needs it, but does not have it by default. %--> 이것은 shadow 지원기능이 필요하지만 기본설정으로 되어 있지 않은 program에 그것을 추가하는 예제이다. <p> <!--% This example uses the <em>Point-to-Point Protocol Server</em> (pppd-1.2.1d), which has a mode in which it performs <em>PAP</em> authentication using user names and passwords from the <tt>/etc/passwd</tt> file instead of the <em>PAP</em> or <em>CHAP</em> files. You would not need to add this code to <tt>pppd-2.2.0</tt> because it's already there. %--> 본 예제로, <em>PAP</em>이나 <em>CHAP</em>대신 <tt>/etc/passwd</tt> file에 있는 사용자이름과 password를 사용하여 <em>PAP</em> 인증을 수행하는 mode를 지닌, <em>Point-to-Point Protocol Server</em> (pppd-1.2.1d)를 들고 있다. <p> <!--% This feature of pppd probably isn't used very much, but if you installed the <em>Shadow Suite</em>, it won't work anymore because the passwords are no longer stored in <tt>/etc/passwd</tt>. %--> pppd의 이런 기능은 그리 자주 쓰이고 있지 않다. 그러나 <em>Shadow Suite</em>가 설치되면 이 기능은 못 쓰게 될 것이다. 왜냐하면 password는 더 이상 <tt>/etc/passwd</tt>에 있지 않기 때문이다. <p> <!--% The code for authenticating users under <tt>pppd-1.2.1d</tt> is located in the <tt>/usr/src/pppd-1.2.1d/pppd/auth.c</tt> file. %--> <tt>ppad-1.2.1d</tt>에서 사용자 인증하는 code는 <tt>/usr/src/pppd-1.2.1d/pppd/auth.c</tt> file에 있다. <p> <!--% The following code needs to be added to the top of the file where all the other <tt>#include</tt> directives are. We have surrounded the <tt>#includes</tt> with conditional directives (i.e. only include if we are compiling for shadow support). %--> 다음 code는 <tt>#include</tt> 지시자가 위치하는 file의 윗부분에 덧댈 필요가 있다. 우리는 조건지시자(conditional directive)로 <tt>#include</tt>를 둘러쌌다 (특별히 shadow 지원기능을 넣어 compile할 때만 포함하도록) <p> <code> #ifdef HAS_SHADOW #include <shadow.h> #include <shadow/pwauth.h> #endif </code> <p> <!--% The next thing to do is to modify the actual code. We are still making changes to the <tt>auth.c</tt> file. %--> 다음은 실제 code를 고치는 일이다. 아직도 <tt>auth.c</tt> file을 고치고 있다. <p> <!--% Function <tt>auth.c</tt> before modifications: %--> 고치기 전의 <tt>auth.c</tt>는: <code> /* * login - Check the user name and password against the system * password database, and login the user if OK. * * returns: * UPAP_AUTHNAK: Login failed. * UPAP_AUTHACK: Login succeeded. * In either case, msg points to an appropriate message. */ static int login(user, passwd, msg, msglen) char *user; char *passwd; char **msg; int *msglen; { struct passwd *pw; char *epasswd; char *tty; if ((pw = getpwnam(user)) == NULL) { return (UPAP_AUTHNAK); } /* * XXX If no passwd, let them login without one. */ if (pw->pw_passwd == '\0') { return (UPAP_AUTHACK); } epasswd = crypt(passwd, pw->pw_passwd); if (strcmp(epasswd, pw->pw_passwd)) { return (UPAP_AUTHNAK); } syslog(LOG_INFO, "user %s logged in", user); /* * Write a wtmp entry for this user. */ tty = strrchr(devname, '/'); if (tty == NULL) tty = devname; else tty++; logwtmp(tty, user, ""); /* Add wtmp login entry */ logged_in = TRUE; return (UPAP_AUTHACK); } </code> <p> <!--% The user's password is placed into <tt>pw->pw_passwd</tt>, so all we really need to do is add the function <tt>getspnam</tt>. This will put the password into <tt>spwd->sp_pwdp</tt>. %--> 사용자 password는 <tt>pw->pw_passwd</tt>에 위치한다. 따라서 할 일은 <tt>getspnam</tt> 함수를 추가하는 것이 전부다. 이 함수는 <tt>spwd->sp_pwdp</tt>에 password를 할당한다. <p> <!--% We will add the function <tt>pwauth</tt> to perform the actual authentication. This will automatically perform secondary authentication if the shadow file is setup for it. %--> 우리는 다른 현존하는(actual) 사용자 확인 작업을 수행하도록 <tt>pwauth</tt> 함수를 넣을 것이다. 이는 shadow file에 설정되어 있으면 자동적으로 두번째 인증을 수행한다. <p> <!--% Function <tt>auth.c</tt> after modifications to support shadow: %--> shadow를 지원하도록 고친 <tt>auth.c</tt>는: <code> /* * login - Check the user name and password against the system * password database, and login the user if OK. * * This function has been modified to support the Linux Shadow Password * Suite if USE_SHADOW is defined. * * returns: * UPAP_AUTHNAK: Login failed. * UPAP_AUTHACK: Login succeeded. * In either case, msg points to an appropriate message. */ static int login(user, passwd, msg, msglen) char *user; char *passwd; char **msg; int *msglen; { struct passwd *pw; char *epasswd; char *tty; #ifdef USE_SHADOW struct spwd *spwd; struct spwd *getspnam(); #endif if ((pw = getpwnam(user)) == NULL) { return (UPAP_AUTHNAK); } #ifdef USE_SHADOW spwd = getspnam(user); if (spwd) pw->pw_passwd = spwd->sp-pwdp; #endif /* * XXX If no passwd, let NOT them login without one. */ if (pw->pw_passwd == '\0') { return (UPAP_AUTHNAK); } #ifdef HAS_SHADOW if ((pw->pw_passwd && pw->pw_passwd[0] == '@' && pw_auth (pw->pw_passwd+1, pw->pw_name, PW_LOGIN, NULL)) || !valid (passwd, pw)) { return (UPAP_AUTHNAK); } #else epasswd = crypt(passwd, pw->pw_passwd); if (strcmp(epasswd, pw->pw_passwd)) { return (UPAP_AUTHNAK); } #endif syslog(LOG_INFO, "user %s logged in", user); /* * Write a wtmp entry for this user. */ tty = strrchr(devname, '/'); if (tty == NULL) tty = devname; else tty++; logwtmp(tty, user, ""); /* Add wtmp login entry */ logged_in = TRUE; return (UPAP_AUTHACK); } </code> <p> <!--% Careful examination will reveal that we made another change as well. The original version allowed access returned <tt>UPAP_AUTHACK</tt> if there was NO password in the <tt>/etc/passwd</tt> file. This is <em>not</em> good, because a common use of this login feature is to use one account to allow access to the PPP process and then check the username and password supplied by PAP with the username in the <tt>/etc/passwd</tt> file and the password in the <tt>/etc/shadow</tt> file. %--> 주의해서 보면 우리가 한 다른 변화를 볼 수 있을 것이다. <tt>/etc/passwd</tt> file에 password가 없다면, 원 version은 <tt>UPAP_AUTHACK</tt>를 돌려주고 접속을 허용했다. 이건 <em>안</em> 좋다. 왜냐하면, 이 login기능의 일반적인 용도는 PPP process에 접근한 다음, PAP에 의해 지원되는 사용자 이름과 password를 <tt>/etc/passwd</tt>에 있는 사용자 이름과 <tt>/etc/shadow</tt>에 있는 password와 맞는지 점검하도록 허용하는, 한 계정을 사용하는 것이기 때문이다. <p> <!--% So if we had set the original version up to run as the shell for a user i.e. <tt>ppp</tt>, then anyone could get a ppp connection by setting their PAP to user <tt>ppp</tt> and a password of null. %--> 따라서, 원 version이 사용자(특히, <tt>ppp</tt>)를 위해 shell을 실행시키도록 설정했다면, 누구든지 그들의 PAP를 사용자이름을 <tt>ppp</tt>, password를 null로 함으로써 ppp 연결을 획득할 수 있었다. <p> <!--% We fixed this also by returning <tt>UPAP_AUTHNAK</tt> instead of <tt>UPAP_AUTHACK</tt> if the password field was empty. %--> 우리는 이것을 password가 없다면 <tt>UPAP_AUTHACK</tt>대신 <tt>UPAP_AUTHNAK</tt>를 되돌려주도록 고쳤다. <p> <!--% Interestingly enough, <tt>pppd-2.2.0</tt> has the same problem. %--> 흥미롭게도 <tt>pppd-2.2.0</tt>로 같은 문제를 지니고 있다. <p> <!--% Next we need to modify the Makefile so that two things occur: <tt>USE_SHADOW</tt> must be defined, and <tt>libshadow.a</tt> needs to be added to the linking process. %--> 다음은 두가지 일이 일어날 수 있도록 Makefile을 고지는 것이다: <tt>USE_SHADOW</tt>가 선언되어 있어야 하고, <tt>libshadow.a</tt>가 link되도록 할 필요가 있다. <p> <!--% Edit the Makefile, and add: %--> Makefile에서는: <tscreen><verb>LIBS = -lshadow </verb></tscreen> <p> <!--% Then we find the line: %--> 그리고나서 다음 줄을: <tscreen><verb>COMPILE_FLAGS = -I.. -D_linux_=1 -DGIDSET_TYPE=gid_t </verb></tscreen> <p> <!--% And change it to: %--> 에서: <tscreen><verb>COMPILE_FLAGS = -I.. -D_linux_=1 -DGIDSET_TYPE=gid_t -DUSE_SHADOW </verb></tscreen> 로 바꾼다. <p> <!--% Now make and install. %--> 이제 만들어서 설치하라. <!--% <sect><heading>Frequently Asked Questions. %--> <sect><heading>자주 묻는 질문들. <p> <!--% <em>Q:</em> I used to control which tty's <em>root</em> could log into using the file <tt>/etc/securettys</tt>, but it doesn't seem to work anymore, what's going on? %--> <em>질:</em> <tt>/etc/securettys</tt> file를 써서 <em>root</em>가 들어갈 수 있는 tty를 조정해왔읍니다만, 이제는 안 됩니다. 뭐가 잘못일까요? <p> <!--% <em>A:</em> The file <tt>/etc/securettys</tt> does absolutely nothing now that the <em>Shadow Suite</em> is installed. The tty's that <em>root</em> can use are now located in the login configuration file <tt>/etc/login.defs</tt>. The entry in this file may point to another file. %--> <em>답:</em> <tt>/etc/securettys</tt> file은 <em>Shadow Suite</em>이 설치된 뒤에는 더이상 쓸 수 없읍니다. login 설정 file인 <tt>/etc/login.defs</tt>에서 <em>root</em>가 쓸 수 있는 tty를 정할 수 있읍니다. 이 file의 항목은 또 다른 file을 가르킬 수 있읍니다. <p> <!--% <em>Q:</em> I installed the <em>Shadow Suite</em>, but now I can't login, what did I miss? %--> <em>질:</em> <em>Shadow Suite</em>을 설치했더니, login할 수 없읍니다. 내가 무얼 빼 먹었지요? <p> <!--% <em>A:</em> You probably installed the Shadow programs, but didn't run <tt>pwconv</tt> or you forgot to copy <tt>/etc/npasswd</tt> to <tt>/etc/passwd</tt> and <tt>/etc/nshadow</tt> to <tt>/etc/shadow</tt>. Also, you may need to copy <tt>login.defs</tt> to <tt>/etc</tt>. %--> <em>답:</em> 아마 Shadow program들을 설치했지만, <tt>pwconv</tt>를 실행시키지 않았던지, <tt>/etc/npasswd</tt>와 <tt>/etc/nshadow</tt>를 <tt>/etc/passwd</tt>와 <tt>/etc/shadow</tt>로 복사하는 것을 잊었을 겁니다. 또한 <tt>login.defs</tt>를 <tt>/etc</tt>로 복사해야 됩니다. <p> <!--% <em>Q:</em> In the section on xlock, it said to change the group ownership of the <tt>/etc/shadow</tt> file to <tt>shadow</tt>. I don't have a <tt>shadow</tt> group, what do I do? %--> <em>질:</em> xlock section에서, <tt>/etc/shadow</tt>의 group 소유자를 <tt>shadow</tt>로 바꾸라고 합니다. 나는 <tt>shadow</tt> group을 가지고 있지 않습니다. 뭘 해야되지요? <p> <!--% <em>A:</em> You can add one. Simply edit the <tt>/etc/group</tt> file, and insert a line for the shadow group. You need to ensure that the group number is not used by another group, and you need to insert it before the <tt>nogroup</tt> entry. Or you can simply suid <tt>xlock</tt> to root. %--> <em>답:</em> 추가하시면 됩니다. 간단히 <tt>/etc/group</tt> file에 한줄 추가하면 됩니다. 다른 group으로 쓰이고 있지 않은 group number로 할당해서 <tt>nogroup</tt> 항목전에 삽입하면 됩니다. 또는 <tt>xlock</tt>를 SUID root로 하면 됩니다. <p> <!--% <em>Q:</em> Is there a mailing list for the Linux Shadow Password Suite? %--> <em>질:</em> Linux Shadow Password Suite에 대한 mailing list가 있읍니까? <p> <!--% <em>A:</em> Yes, but it's for the development and beta testing of the next Shadow Suite for Linux. You can get added to the list by mailing to: <tt>shadow-list-request@neptune.cin.net</tt> with a subject of: <tt>subscribe</tt>. The list is actually for discussions of the Linux <tt>shadow-YYMMSS</tt> series of releases. You should join if you want to get involved in further development or if you install the Suite on your system and want to get information on newer releases. %--> <em>답:</em> 예, 하지만 다음 Linux Shadow Suite의 beta test와 개발을 위한 겁니다. <tt>shadow-list-request@neptune.cin.net</tt>에 제목(subject)을 <tt>subscribe</tt>로 해서 mail로 보내시면 list에 추가되실 수 있읍니다. 이 list는 실지로 Linux <tt>shadow-YYMMSS</tt> series에 대해서 토론하고 있읍니다. 만일 개발에 참가하고 싶거나, 당신의 system에 Suite를 깔고 최근 release에 대한 정보를 얻고 싶다면, 참가하셔도 됩니다. <p> <!--% <em>Q:</em> I installed the <em>Shadow Suite</em>, but when I use the <tt>userdel</tt> command, I get "userdel: cannot open shadow group file", what did I do wrong? %--> <em>질:</em> <em>Shadow Suite</em>를 설치했읍니다. 그런데, <tt>userdel</tt> 명령을 사용할 때마다, "userdel: cannot open shadow group file"이란 message를 받습니다. 뭘 잘못했지요? <p> <!--% <em>A:</em> You compiled the <em>Shadow Suite</em> with the <tt>SHADOWGRP</tt> option enabled, but you don't have an <tt>/etc/gshadow</tt> file. You need to either edit the <tt>config.h</tt> file and recompile, or create an <tt>/etc/group</tt> file. See the section on shadow groups. %--> <em>답:</em> <em>Shadow Suite</em>를 <tt>SHADOWGRP</tt> option가능으로 compile했지만, <tt>/etc/gshadow</tt> file이 없는 것입니다. <tt>config.h</tt>를 편집해서 다시 compile하거나, <tt>/etc/group</tt> file을 만드십시요. shadow group에 대한 section을 참조하시기 바랍니다. <p> <!--% <em>Q:</em> I installed the <em>Shadow Suite</em> but now I'm getting encoded passwords back in my <tt>/etc/passwd</tt> file, what's wrong? %--> <em>질:</em> <em>Shadow Suite</em>을 설치했지만, 지금 <tt>/etc/passwd</tt>에 encode된 password가 있읍니다. 뭐가 잘못됐지요? <p> <!--% <em>A:</em> You either enabled the <tt>AUTOSHADOW</tt> option in the Shadow <tt>config.h</tt> file, or your <tt>libc</tt> was compiled with the <tt>SAHDOW_COMPAT</tt> option. You need to determine which is the problem, and recompile. %--> <em>답:</em> Shadow <tt>config.h</tt> file에 <tt>AUTOSHADOW</tt> option 가능하게 했거나, <tt>libc</tt>를 <tt>SHADOW_COMPAT</tt> option을 주고 compile했을 겁니다. 어느 문제인지 확인해서 다시 compile하십시요. <!--% <sect><heading>Copyright Message. %--> <sect><heading>저작권에 관해서. <p> The Linux Shadow Password HOWTO is Copyright (c) 1996 Michael H. Jackson. <p> <!--% Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are preserved on all copies. <p> Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim copies above, provided a notice clearly stating that the document is a modified version is also included in the modified document. <p> Permission is granted to copy and distribute translations of this document into another language, under the conditions specified above for modified versions. <p> Permission is granted to convert this document into another media under the conditions specified above for modified versions provided the requirement to acknowledge the source document is fulfilled by inclusion of an obvious reference to the source document in the new media. Where there is any doubt as to what defines 'obvious' the copyright owner reserves the right to decide. %--> 모든 사본에 저작권와 이 허가 통고가 제공되는 이 문서의 동일한 사본을 만들고 배포하는 것을 허가합니다. <p> 위에 명기된 동일한 사본에 대한 조건하에서, 문서가 수정된 것이라는 명백한 통고가 수정된 문서에 또한 포함되어, 이 문서의 수정된 version을 복사하고 배포하는 행위를 허가합니다. <p> 위에 수정된 version에 대해 서술한 조건하에서, 이 문서의 다른 언어 번역본을 복사하고 배포하는 것을 허가합니다. <p> 위에 수정된 version에 대해 서술한 조건하에서, 새로운 매체에 원 문서에 대한 알기 쉬운 참조을 포함시키는 것과 비슷한 원 문서를 알리는 데 필요한 사항을 담고, 이 문서를 다른 매체로 바꾸는 것을 허가합니다. <!--% <sect><heading>Miscellaneous and Acknowledgments. %--> <sect><heading>감사말과 그 밖에... <p> <!--% The code examples for <tt>auth.c</tt> are taken from pppd-1.2.1d and ppp-2.1.0e, Copyright (c) 1993 and The Australian National University and Copyright (c) 1989 Carnegie Mellon University. %--> <tt>auth.c</tt>에 대한 code 예제는 Copyright (c) 1993 and The Australian National University와 Copyright (c) 1989 Carnegie Mellon University의 pppd-1.2.1d와 ppp-2.1.0e에서 빌려왔다. <p> <!--% Thanks to Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl> for writing and maintaining the <em>Shadow Suite</em> for Linux, and for his review and comments on this document. %--> Linux용 <em>Shadow Suite</em>을 만들고, 유지보수하고 있는 것에 대해, 그리고 이 문서를 쭉 보고 논평해주신 Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl>께 감사드립니다. <p> <!--% Thanks to Ron Tidd <rtidd@tscnet.com> for his helpful review and testing. %--> 친절하게 쭉 읽고, 시험해주신 Ron Tidd <rtidd@tscnet.com>께 감사드립니다. <p> <!--% Thanks to everyone who has sent me feedback to help improve this document. %--> 이 문서가 더 나아지도록 정정사항을 알려주신 여러분께 감사드립니다. <p> <!--% Please, if you have any comments or suggestions then mail them to me. regards %--> 어떤 논평이나 제안을 제게 보내주시기 바랍니다. <p> <htmlurl url="mailto:mhjack@tscnet.com" name="Michael H. Jackson <mhjack@tscnet.com>"> <p> 이 번역에 대한 어떠한 논평이나 충고 부탁드립니다. <p> <htmlurl url="mailto:tolkien@nownuri.nowcom.co.kr" name="조용일 <tolkien@nownuri.nowcom.co.kr>"> </article>