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

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