home *** CD-ROM | disk | FTP | other *** search
Wrap
Path: sparky!uunet!spool.mu.edu!agate!netsys!news!nic.cerf.net!raymond From: raymond@nic.cerf.net (Raymond Roque) Newsgroups: comp.unix.questions Subject: restricted ftp account Message-ID: <4002@news.cerf.net> Date: 12 Dec 92 05:00:58 GMT Sender: news@news.cerf.net Organization: CERFnet Lines: 47 Nntp-Posting-Host: nic.cerf.net Dear Sir/Madam: 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. Got some notes in the Internet on setting it up. I created a subdirectory /var/spool/rftp. Underneat it was the following directories: bin, dev, usr, /usr/lib, tmp, and etc. This will be my new root. 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 and edited out the other accounts with password. Since I'm using a Sun Station, I created the /dev/zero files and copied /usr/lib/lib.so* to ~rftp/usr/lib. Added the line "rftp 22/tcp" on my /etc/services NIS map file. 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. Following the short note, I then typed the shell script it told me into a file /etc/in.rftpd #!/bin/sh /usr/etc/chroot /var/spool/rftp /usr/etc/in.ftpd $* Lastly, in the /etc/passwd and /var/spool/rftp/etc/passwd files - I created an account: testacct:*:160:60:FTP account:/var/spool/rftpd:/etc/in.rftp But when I logged into the ftp account, it gave me a message "530 User testacct Access denied". 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. The note also mentioned to "give them (ftp account) a shell that is in /var/spool/rftp/etc/shells. My entry in this file are: /bin/sh /bin/csh Can you please explain more on this please? There is probably a simple step that I neglected to do. Sincerely, Raymond Roque Systems Administrator International Documentation raymond@cerfnet.com