home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / question / 14621 < prev    next >
Encoding:
Internet Message Format  |  1992-12-12  |  2.1 KB

  1. Path: sparky!uunet!spool.mu.edu!agate!netsys!news!nic.cerf.net!raymond
  2. From: raymond@nic.cerf.net (Raymond Roque)
  3. Newsgroups: comp.unix.questions
  4. Subject: restricted ftp account
  5. Message-ID: <4002@news.cerf.net>
  6. Date: 12 Dec 92 05:00:58 GMT
  7. Sender: news@news.cerf.net
  8. Organization: CERFnet
  9. Lines: 47
  10. Nntp-Posting-Host: nic.cerf.net
  11.  
  12. Dear Sir/Madam:
  13.  
  14. I'm trying to setup a restricted ftp login account with the use of the "chroot" command. I'm still new at this and needs some help.
  15.  
  16. Got some notes in the Internet on setting it up.
  17.  
  18. I created a subdirectory /var/spool/rftp.  Underneat it was the following directories: bin, dev, usr, /usr/lib, tmp, and etc.  
  19. This will be my new root.  
  20.  
  21. I then copied ls, pwd, and mkdir from /bin to /var/spool/rftp/bin.  Copied the passwd and group file into /var/spool/rftp/etc 
  22. and edited out the other accounts with password. 
  23.  
  24. Since I'm using a Sun Station, I created the /dev/zero files 
  25. and copied /usr/lib/lib.so* to ~rftp/usr/lib.
  26.  
  27. Added the line "rftp   22/tcp" on my /etc/services NIS map file. 
  28. Typed "rftp   stream   tcp   nowait   root    /etc/in.rftpd   in.ftpd" on my /etc/inetd.conf file and issue kill -HUP pid of inetd to reset the network deamons.
  29.  
  30. Following the short note, I then typed the shell script it told me into a file /etc/in.rftpd
  31.  
  32.  #!/bin/sh 
  33.  /usr/etc/chroot /var/spool/rftp /usr/etc/in.ftpd $* 
  34.  
  35. Lastly, in the /etc/passwd and /var/spool/rftp/etc/passwd files - I created an account:
  36.   testacct:*:160:60:FTP account:/var/spool/rftpd:/etc/in.rftp
  37.  
  38. But when I logged into the ftp account, it gave me a message
  39. "530 User testacct Access denied".
  40.  
  41. I noticed that when I boot up my machine and the inetd deamon starts, it flags me "rftpd/tcp: service unknown" even when it was define in the /etc/services file.
  42.  
  43. The note also mentioned to "give them (ftp account) a shell that is in /var/spool/rftp/etc/shells.  
  44. My entry in this file are:
  45.   /bin/sh
  46.   /bin/csh
  47.  
  48. Can you please explain more on this please?  
  49.  
  50. There is probably a simple step that I neglected to do.
  51.  
  52. Sincerely,
  53. Raymond Roque
  54.  
  55. Systems Administrator
  56. International Documentation
  57.  
  58. raymond@cerfnet.com
  59.