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»óÅ·Πµ¿À۵DZ⿡ <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) »Ó¸¸ ¾Æ´Ï¶ó ÀüüÀûÀÎ(as a whole) <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> ÆÄÀÏÀº ³»ºÎ¿¡ ÀÖ´Â ¼ö¸¹Àº commentµé·Î ¸Å¿ì Àß ¹®¼­È­µÇ¾î ÀÖ´Ù. ±×·¯³ª, ÀÌ ÆÄÀÏÀº ´ÙÀ½°ú °°Àº ÁÖÀÇÇÒ ¸î °¡Áö °ÍµéÀ» ´ã°í ÀÖ´Ù: <itemize> <item>¹ß»ýÇÏ´Â logÀÇ ¾ç(?)À» °áÁ¤ÇÏ´Â on/off¹æ½ÄÀÇ flagµé. <item>´Ù¸¥ ¼³Á¤ ÆÄÀϵé(files)À» °¡¸®Å°´Â pointerµé. <item>password À¯È¿±â°£ ¼³Á¤°°Àº ±âº» ¼³Á¤Ä¡µé(assignments). </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. %--> À§¿¡¼­ º¸µí ÀÌ ³ðÀº »ó´çÈ÷ Áß¿äÇÑ ÆÄÀÏÀÌ´Ù. µû¶ó¼­, Áö±Ý ÀÖ´ÂÁö È®ÀÎÇÏ°í, ¼³Á¤µéÀÌ 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>