Axil S/E-kdk001
                                   1995.10.6
                                  Kim Do Kyung

SUBJECT: Anonymous FTP Set-up(Solaris 2.X)

CONTENTS:
0. ¹Ì¸® º¸±â
1. Accounting Rules
2. Setting Flow...
3. µµ¿ò º¸±â

DESCRIPTION:

0. ¹Ì¸® º¸±â
   
   - MEMO woo006(Anonymous ftpÀÇ Setup on Solaris 1.X) 

1. in.ftpd DaemonÀÌ Çã¶ôÇÏ´Â Accounting Rules 

   1) User nameÀÌ /etc/passwd Database¿¡ ÀÖ¾î¾ß ÇÏ°í, passwowd´Â nullÀÌ ¾Æ´Ï¾î¾ß ÇÑ´Ù.
   2) User nameÀÌ /etc/ftpusers file¿¡ µî·ÏµÇ¾î ÀÖ´Ù¸é, ±× User´Â Ftp Server¿¡ Access ÇÒ ¼ö ¾ø´Ù.
   3) /etc/passwd¿¡¼­ ÁöÁ¤ÇÑ UserÀÇ ShellÀÌ /etc/shells File¿¡ µî·ÏµÇ¾î ÀÖÁö ¾Ê´Ù¸é Ftp Access´Â °ÅºÎµÉ °ÍÀÌ´Ù. 
      ´Ü, ´ÙÀ½°ú °°Àº ShellÀº ¿¹¿Ü´Ù.
      /usr/bin/sh   /usr/bin/csh   /usr/bin/ksh
      /usr/bin/jsh  /bin/sh        /bin/csh
      /bin/ksh      /bin/jsh       /sbin/sh
      /sbin/jsh
   4) /etc/passwd¿¡¼­ ShellÀÌ /nosuchshell·Î µÇ¾î ÀÖ°í /etc/shells¿¡ /nosuchshell·Î µî·ÏµÇ¾î ÀÖ´Ù¸é anonymousÁ¢¼Ó¸¸ °¡´ÉÇÏ°í root¹× ÀÏ¹Ý user·ÎÀÇ ftp´Â ºÒ°¡´ÉÇÏ°Ô µÈ´Ù. 
 
2. Setting Flow...

   1) ~ftp
       Home DirectoryÀÇ Owner´Â ftpÀÌ°í µý³ðµéÀº Unwrite Permission.
       ÀÌ Directory´Â nosuid optionÀ¸·Î mountµÈ File system¿¡ Á¸ÀçÇؼ­´Â ¾ÈµÈ´Ù.
   2) ~ftp/bin
       Owner´Â rootÀÌ°í, µý³ðµéÀº Unwrite Permission.
       /usr/bin/ls¸¦ copyÇÏ°í PermissionÀº 111.
   3) ~ftp/usr/lib
       Owner´Â rootÀÌ°í, µý³ðµéÀº Unwrite Permission.
       /usr/lib¿¡ ÀÖ´Â ´ÙÀ½°ú °°Àº Shared Library¸¦ Copy.

            ld.so*
            libc.so*
            libdl.so*
            libintl.so*
            libw.so*
            libnsl.so*
            libsocket.so*
            nss_nis.so*
            nss_nisplus.so*
            nss_dns.so*
            nss_files.so*
            straddr.so*
    
    4) ~ftp/etc
        Owner´Â rootÀÌ°í, µý³ðµéÀº Unwrite Permission.
        ls Command°¡ Á¦´ë·Î ¼öÇàµÇ±â À§ÇØ /etc/passwd /etc/group /etc/netconfig¸¦ copy.
        ÀÌ FileµéÀÇ PermissionÀº 444
    5) ~ftp/pub
        Owner´Â ftpÀÌ°í PermissionÀº 777
    6) ~ftp/dev
        Owner´Â rootÀÌ°í, µý³ðµéÀº Unwrite Permission.
        ´ÙÀ½°ú °°Àº fileµéÀ» mknod Command·Î ¸¸µå´Âµ¥ #Major¿Í #Minor°¡ °°¾Æ¾ß ÇÑ´Ù.
        #Major¿Í #Minor´Â ls -lL Command·Î È®ÀÎÇÒ ¼ö ÀÖ´Ù.
        (¿¹... Atom /home/ftp/dev> mknod zero c 13 12 [Enter])

             /dev/zero
             /dev/tcp
             /dev/udp
             /dev/ticotsord

     7) /etc/passwd FileÀÇ ¿¹
        "ftp:x:30000:30000:Anonymous Ftp:/home/ftp:/nosuchshell
     8) /etc/shadow FileÀÇ ¿¹ 
        "ftp:NP:6445::::::"

3. µµ¿ò º¸±â

   - man ftpd
   - Bug report 1131158 (Anonymous ftp script does not work)
   - Bug report 1085306 (errors in ftpd(1M) man page in description of anonymous ftp setup)
   - Bug report 1130010 (script to set up anonymous FTP is needed)