# # Anonymous FTP ¼³Ä¡ ¹æ¹ý (Solaris 2.x) # 0. Be the superuser. 1. Add the pseudo-user "ftp" in /etc/passwd file and /etc/shadow file with "misc" group. eg) ftp:x:100:100:anonymous ftp:/usr/FTP:/bin/true <- passwd eg) ftp::6445:::::: <- shadow 2. Make an entry 'misc' in /etc/group" eg) ftp_g::100: 3. Create directories. % mkdir ~ftp ~ftp/{bin,dev,etc,pub,usr,usr/lib} 4. Copy /bin/ls. % cp /bin/ls ~ftp/bin 5. Copy /etc/{passwd,group,netconfig}and edit them properly. % cp /etc/{passwd,group,netconfig} ~ftp/etc 6. Copy the runtime loader. % cp /usr/lib/ld.so ~ftp/usr/lib/ld.so % cp /usr/lib/ld.so.1 ~ftp/usr/lib/ld.so.1 7. Create ~ftp/dev/zero used by the runtime loader. % cd ~ftp/dev % mknod tcp c 11 42 % mknod ticotsord c 105 1 % mknod udp c 11 41 % mknod zero c 13 12 8. Make a copy of the latest version of the shared C library. % cp /usr/lib/libc* ~ftp/usr/lib % cp /usr/lib/libdl* ~ftp/usr/lib % cp /usr/lib/libintl* ~ftp/usr/lib % cp /usr/lib/libnsl* ~ftp/usr/lib % cp /usr/lib/libsocket* ~ftp/usr/lib % cp /usr/lib/libw* ~ftp/usr/lib % cp /usr/lib/nss_* ~ftp/usr/lib % cp /usr/lib/straddr* ~ftp/usr/lib 9. Set the permissions on the files and directories. % cd ~ftp % chown root . pub % chgrp other . pub % chown root bin bin/ls etc etc/[pg]* dev dev/zero usr usr/lib usr/lib/* % chgrp wheel bin bin/ls etc etc/* dev dev/zero usr usr/lib usr/lib/* % chmod 111 bin/ls % chmod 444 etc/* % chmod 555 . bin dev etc usr usr/lib usr/lib/* % chmod 777 pub 10. Make sure "ftpd" is in the /etc/inetd.conf file. eg) # ident "@(#)inetd.conf 1.16 94/03/08 SMI" ftp stream tcp nowait root /usr/sbin/in.ftpd in.ftpd 11. Fill ~ftp/pub with goodies