<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ftp in restricted shell? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-in-restricted-shell/m-p/2713675#M61186</link>
    <description>To restrict the user to his directory and subdirectories:&lt;BR /&gt;Set the user's shell to 'rsh', the restrited shell. You can set this in the /etc/passwd file.&lt;BR /&gt;&lt;BR /&gt;To allow ONLY ftp:&lt;BR /&gt;In the user's startup file ($HOME/.profile), add the following line&lt;BR /&gt;exec ftp&lt;BR /&gt;When the user logs in he will be taken straight to the ftp prompt. On exiting ftp, he will be automatically logged off.</description>
    <pubDate>Tue, 30 Apr 2002 01:26:58 GMT</pubDate>
    <dc:creator>Deepak Extross</dc:creator>
    <dc:date>2002-04-30T01:26:58Z</dc:date>
    <item>
      <title>ftp in restricted shell?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-in-restricted-shell/m-p/2713671#M61182</link>
      <description>Hi,&lt;BR /&gt;How do i set up a user to perform ftp only, the user must can onlu stay in it's own home directory.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 30 Apr 2002 01:10:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-in-restricted-shell/m-p/2713671#M61182</guid>
      <dc:creator>Bernard Lee</dc:creator>
      <dc:date>2002-04-30T01:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: ftp in restricted shell?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-in-restricted-shell/m-p/2713672#M61183</link>
      <description>&lt;BR /&gt;INCOMING or OUTGOING?&lt;BR /&gt;&lt;BR /&gt;INCOMING, you can use chroot. &lt;BR /&gt;&lt;BR /&gt;OUTGOING, well not much there.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Tue, 30 Apr 2002 01:12:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-in-restricted-shell/m-p/2713672#M61183</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-04-30T01:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: ftp in restricted shell?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-in-restricted-shell/m-p/2713673#M61184</link>
      <description>Hey !!&lt;BR /&gt;&lt;BR /&gt;By using the restricted shell &lt;BR /&gt;you can achive this&lt;BR /&gt;&lt;BR /&gt;use /user/bin/rsh&lt;BR /&gt;&lt;BR /&gt;make sure that you put this entry in  /etc/shells&lt;BR /&gt;&lt;BR /&gt;-Niraj</description>
      <pubDate>Tue, 30 Apr 2002 01:21:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-in-restricted-shell/m-p/2713673#M61184</guid>
      <dc:creator>Niraj Kumar Verma</dc:creator>
      <dc:date>2002-04-30T01:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: ftp in restricted shell?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-in-restricted-shell/m-p/2713674#M61185</link>
      <description>How can I restric certian users to one directory though ftp in 10.20</description>
      <pubDate>Tue, 30 Apr 2002 01:24:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-in-restricted-shell/m-p/2713674#M61185</guid>
      <dc:creator>Bernard Lee</dc:creator>
      <dc:date>2002-04-30T01:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: ftp in restricted shell?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-in-restricted-shell/m-p/2713675#M61186</link>
      <description>To restrict the user to his directory and subdirectories:&lt;BR /&gt;Set the user's shell to 'rsh', the restrited shell. You can set this in the /etc/passwd file.&lt;BR /&gt;&lt;BR /&gt;To allow ONLY ftp:&lt;BR /&gt;In the user's startup file ($HOME/.profile), add the following line&lt;BR /&gt;exec ftp&lt;BR /&gt;When the user logs in he will be taken straight to the ftp prompt. On exiting ftp, he will be automatically logged off.</description>
      <pubDate>Tue, 30 Apr 2002 01:26:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-in-restricted-shell/m-p/2713675#M61186</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-04-30T01:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: ftp in restricted shell?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-in-restricted-shell/m-p/2713676#M61187</link>
      <description>Say you want to setup user "ftpguest" to only do ftp. The recipe as follows ..&lt;BR /&gt;(I got this from my own notes, can't remembet the source but it's good !)&lt;BR /&gt;&lt;BR /&gt;1) Make the edits to the /etc/passwd file&lt;BR /&gt;&lt;BR /&gt;ftpguest:4rL2HZkDatENY:505:125::/home/ftp/ftpguest/./:/usr/bin/false&lt;BR /&gt;&lt;BR /&gt;The '.' is the delimiter to determine where the chroot will be performed. In this example, after logging in '/' will in effect be /home/ftp/ftpguest. If the delimiter was placed between ftp and ftpguest then '/' would be /home/ftp  &lt;BR /&gt;The ftpguest was used as the account name in this example but you could use any name you like.&lt;BR /&gt;&lt;BR /&gt;2) /usr/bin/false will have to be added to the /etc/shells file.&lt;BR /&gt;&lt;BR /&gt;3) Make the edits to the /etc/group file&lt;BR /&gt;&lt;BR /&gt;ftpgroup::125:ftpguest&lt;BR /&gt;&lt;BR /&gt;Create and set the permissions and ownership for the directory /home/ftp/ftpguest to what suits you best.&lt;BR /&gt;&lt;BR /&gt;4) Add an entry into the ftpaccess file. This file will most probably have to be copied from the /usr/newconfig/etc/ftpd/ftpaccess to /etc/ftpd/ftpaccess.&lt;BR /&gt;&lt;BR /&gt;Add a guestgroup entry (in /etc/ftpd/ftpaccess file) to allow a group of users to be treated as 'guests'. This entry will correspond to the entry in the /etc/group file. Here is a sample of the ftpaccess file to use guest&lt;BR /&gt;groups.&lt;BR /&gt;&lt;BR /&gt;# specify which group of users will be treated as "guests".&lt;BR /&gt;guestgroup ftpgroup&lt;BR /&gt;&lt;BR /&gt;5) Edit the /etc/inetd.conf file and add the '-a' option to enable ftpd to use the ftpaccess file. Here is an example;&lt;BR /&gt;&lt;BR /&gt;ftp stream tcp nowait root /usr/lbin/ftpd      ftpd -l -a&lt;BR /&gt;&lt;BR /&gt;You will need to reconfigure inetd by running /usr/sbin/inetd -c to reread the /etc/inetd.conf file after making the change.&lt;BR /&gt;&lt;BR /&gt;6) Since this is similar to anonymous FTP in the respect that you are in a chrooted area (the path to / is different than on your system) you will also have to replicate the /usr/bin and /etc directories. The easiest way to do this is to use SAM to create an anonymous FTP setup and then replicate the /etc &amp;amp; /usr/bin directories into your ftp guest root directory. Here is an example of how you would replicate the ~ftp/usr and ~ftp/etc directory to your new ftp guest directory. Use the ftpguest user in this example.&lt;BR /&gt;&lt;BR /&gt;# cp -R ~ftp/usr ~ftpguest/usr&lt;BR /&gt;# cp -R ~ftp/etc ~ftpguest/etc&lt;BR /&gt;&lt;BR /&gt;At this point you should have the files and programs needed for your ftpguest user.&lt;BR /&gt;&lt;BR /&gt;** This is dependent upon where the '.' delimiter has been positioned. If the delimiter is positioned prior to the ftp username then only the root directory (/home/ftp) needs to contain a /usr &amp;amp; /etc directory structure. If the delimiter is placed post the username then each individual user will require this directory structure.&lt;BR /&gt;&lt;BR /&gt;** When providing the 'ls' command, use /sbin/ls, not /usr/bin/ls.&lt;BR /&gt;&lt;BR /&gt;7) Another thing .. you must touch the file /etc/ftpd/ftpgroups. If you do not, you will see messages in syslog.log indicating that ftpd could not stat this file.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Apr 2002 01:27:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-in-restricted-shell/m-p/2713676#M61187</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-04-30T01:27:54Z</dc:date>
    </item>
  </channel>
</rss>

