<?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: To restrict the PATH on UNIX. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631845#M378563</link>
    <description>Hi Steven, Dennis, Aneesh and Suraj.&lt;BR /&gt;Thanks for your responses.&lt;BR /&gt;&lt;BR /&gt;Dennis, please could you tell me how can I insert $HOME in front?&lt;BR /&gt;That procedure is in the .profile file?&lt;BR /&gt;&lt;BR /&gt;I understand the chroot is an operation that changes the apparent disk root directory for the current running process and its children, but what do I need to change in /etc/passwd of the user?&lt;BR /&gt;&lt;BR /&gt;I followed the instructions according &lt;A href="http://tldp.org/HOWTO/Chroot-BIND-HOWTO-2.html" target="_blank"&gt;http://tldp.org/HOWTO/Chroot-BIND-HOWTO-2.html&lt;/A&gt; but it was not successful.&lt;BR /&gt;&lt;BR /&gt;Can anybody help me, please?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;DASM</description>
    <pubDate>Wed, 12 May 2010 14:24:34 GMT</pubDate>
    <dc:creator>Damián Sarmiento</dc:creator>
    <dc:date>2010-05-12T14:24:34Z</dc:date>
    <item>
      <title>To restrict the PATH on UNIX.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631836#M378554</link>
      <description>Hi.&lt;BR /&gt;&lt;BR /&gt;I´m trying to restrict the path in an user on Unix.&lt;BR /&gt;The user has a home directory in /dir1/dir2/dir3&lt;BR /&gt;The are more directorys and I need the user doesn´t join another directory.&lt;BR /&gt;&lt;BR /&gt;Can anybody help me to do this?&lt;BR /&gt;&lt;BR /&gt;My OS is HP-UX B.11.31 U ia64&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;Regards.</description>
      <pubDate>Tue, 11 May 2010 15:09:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631836#M378554</guid>
      <dc:creator>Damián Sarmiento</dc:creator>
      <dc:date>2010-05-11T15:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: To restrict the PATH on UNIX.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631837#M378555</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;  For which directory you don't want to access the user you can set the permisstion for that directory,chmod 700 &lt;DIR-NAME&gt;&lt;/DIR-NAME&gt;</description>
      <pubDate>Tue, 11 May 2010 15:36:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631837#M378555</guid>
      <dc:creator>Sri_kanth</dc:creator>
      <dc:date>2010-05-11T15:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: To restrict the PATH on UNIX.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631838#M378556</link>
      <description>The restricted shells, rsh/rksh do not let you use cd.  Nor specify files or paths with "/".</description>
      <pubDate>Tue, 11 May 2010 15:39:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631838#M378556</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-05-11T15:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: To restrict the PATH on UNIX.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631839#M378557</link>
      <description>Hi Sri sam&lt;BR /&gt;&lt;BR /&gt;I did that procedure but it wasnÂ´t successful.&lt;BR /&gt;&lt;BR /&gt;# cd /tmp&lt;BR /&gt;# mkdir dir1&lt;BR /&gt;# cd dir1&lt;BR /&gt;# mkdir dir2&lt;BR /&gt;# cd dir2&lt;BR /&gt;# mkdir dir3&lt;BR /&gt;# groupadd prueba&lt;BR /&gt;# useradd unix&lt;BR /&gt;# ll&lt;BR /&gt;total 0&lt;BR /&gt;drwxr-xr-x   2 root       sys             96 May 11 11:44 dir3&lt;BR /&gt;# chown unix:prueba dir3&lt;BR /&gt;# ll&lt;BR /&gt;total 0&lt;BR /&gt;drwxr-xr-x   2 unix       prueba          96 May 11 11:44 dir3&lt;BR /&gt;# cd dir3&lt;BR /&gt;# mkdir dir4&lt;BR /&gt;# ll&lt;BR /&gt;total 0&lt;BR /&gt;drwxr-xr-x   2 root       sys             96 May 11 11:45 dir4&lt;BR /&gt;# chgrp users dir4&lt;BR /&gt;# ll&lt;BR /&gt;total 0&lt;BR /&gt;drwxr-xr-x   2 root       users           96 May 11 11:45 dir4&lt;BR /&gt;# chmod 770 dir4&lt;BR /&gt;# ll&lt;BR /&gt;total 0&lt;BR /&gt;drwxrwx---   2 root       users           96 May 11 11:45 dir4&lt;BR /&gt;# cd ../..&lt;BR /&gt;# chgrp users dir2&lt;BR /&gt;# chmod 770 dir2&lt;BR /&gt;# cd ..&lt;BR /&gt;# chgrp users dir1&lt;BR /&gt;# chmod 770 dir1&lt;BR /&gt;&lt;BR /&gt;passwd file [/etc/passwd]:&lt;BR /&gt;unix:*:115:109::/tmp/dir1/dir2/dir3:/sbin/sh&lt;BR /&gt;&lt;BR /&gt;group file [/etc/group]:&lt;BR /&gt;prueba::109:&lt;BR /&gt;&lt;BR /&gt;But when I log in with the unix user, its home directory is in the / directory. I guess it is because the dir1 has 770 Permissions.&lt;BR /&gt;&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;&lt;BR /&gt;Hi Dennis Handly.&lt;BR /&gt;&lt;BR /&gt;Thanks for your response.&lt;BR /&gt;It works!&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;Regards. :)</description>
      <pubDate>Tue, 11 May 2010 16:14:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631839#M378557</guid>
      <dc:creator>Damián Sarmiento</dc:creator>
      <dc:date>2010-05-11T16:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: To restrict the PATH on UNIX.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631840#M378558</link>
      <description>Hi again.&lt;BR /&gt;&lt;BR /&gt;I have a question about the rsh.&lt;BR /&gt;This shell does not allow to change any directory.&lt;BR /&gt;Is there a way to can change only in my path?&lt;BR /&gt;For example:&lt;BR /&gt;$ whoami&lt;BR /&gt;dsarmien&lt;BR /&gt;$ pwd&lt;BR /&gt;/home/dsarmien&lt;BR /&gt;$ ll&lt;BR /&gt;total 0&lt;BR /&gt;drwxr-xr-x   2 dsarmien   users           96 May 11 12:47 dir1&lt;BR /&gt;$ cd dir1&lt;BR /&gt;$ ll&lt;BR /&gt;total 0&lt;BR /&gt;$ pwd&lt;BR /&gt;/home/dsarmien/dir1&lt;BR /&gt;&lt;BR /&gt;But in other directorys the system would restrict the access?&lt;BR /&gt;$ cd /&lt;BR /&gt;rsh: cd: The operation is not allowed in a restricted shell.&lt;BR /&gt;$ cd ../..&lt;BR /&gt;rsh: cd: The operation is not allowed in a restricted shell.&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;Any idea?&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;DASM</description>
      <pubDate>Tue, 11 May 2010 16:53:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631840#M378558</guid>
      <dc:creator>Damián Sarmiento</dc:creator>
      <dc:date>2010-05-11T16:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: To restrict the PATH on UNIX.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631841#M378559</link>
      <description>Shalom DASM,&lt;BR /&gt;&lt;BR /&gt;1) You can restrict path all you like, the user however can change it back.&lt;BR /&gt;&lt;BR /&gt;2) Your restricted shell is working correctly in your last post. The point is to prevent cd up to root.&lt;BR /&gt;&lt;BR /&gt;3) You have a third option called chroot ssh. Secure Shell (openssh) for HP-UX comes with a script to create a chroot ssh environment, but the response to your cd commands in your last post will be identical.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 11 May 2010 17:13:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631841#M378559</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2010-05-11T17:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: To restrict the PATH on UNIX.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631842#M378560</link>
      <description>&amp;gt;Is there a way to can change only in my path?&lt;BR /&gt;&lt;BR /&gt;rsh allows you to create aliases or functions that can invoke an unrestricted cd.&lt;BR /&gt;&lt;BR /&gt;What you need to do is put enough checking there.  Or always insert $HOME in front.</description>
      <pubDate>Wed, 12 May 2010 07:10:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631842#M378560</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-05-12T07:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: To restrict the PATH on UNIX.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631843#M378561</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;The are more directorys and I need the user doesnÂ´t join another directory.&lt;BR /&gt;&lt;BR /&gt;You can create a jail and limit a particular user direcoties using chroot in /etc/passwd of the user.&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;Use&lt;BR /&gt;/opt/ssh/ssh_chroot_setup.sh&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Aneesh</description>
      <pubDate>Wed, 12 May 2010 07:15:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631843#M378561</guid>
      <dc:creator>Aneesh Mohan</dc:creator>
      <dc:date>2010-05-12T07:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: To restrict the PATH on UNIX.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631844#M378562</link>
      <description>hi,&lt;BR /&gt;you need to implement chroot...&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://tldp.org/HOWTO/Chroot-BIND-HOWTO.html" target="_blank"&gt;http://tldp.org/HOWTO/Chroot-BIND-HOWTO.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Suraj</description>
      <pubDate>Wed, 12 May 2010 07:42:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631844#M378562</guid>
      <dc:creator>Suraj K Sankari</dc:creator>
      <dc:date>2010-05-12T07:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: To restrict the PATH on UNIX.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631845#M378563</link>
      <description>Hi Steven, Dennis, Aneesh and Suraj.&lt;BR /&gt;Thanks for your responses.&lt;BR /&gt;&lt;BR /&gt;Dennis, please could you tell me how can I insert $HOME in front?&lt;BR /&gt;That procedure is in the .profile file?&lt;BR /&gt;&lt;BR /&gt;I understand the chroot is an operation that changes the apparent disk root directory for the current running process and its children, but what do I need to change in /etc/passwd of the user?&lt;BR /&gt;&lt;BR /&gt;I followed the instructions according &lt;A href="http://tldp.org/HOWTO/Chroot-BIND-HOWTO-2.html" target="_blank"&gt;http://tldp.org/HOWTO/Chroot-BIND-HOWTO-2.html&lt;/A&gt; but it was not successful.&lt;BR /&gt;&lt;BR /&gt;Can anybody help me, please?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;DASM</description>
      <pubDate>Wed, 12 May 2010 14:24:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631845#M378563</guid>
      <dc:creator>Damián Sarmiento</dc:creator>
      <dc:date>2010-05-12T14:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: To restrict the PATH on UNIX.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631846#M378564</link>
      <description>&lt;!--!*#--&gt;&amp;gt;please could you tell me how can I insert $HOME in front?  That procedure is in the .profile file?&lt;BR /&gt;&lt;BR /&gt;It turns out it is less than ideal.  You can't use aliasing nor functions.  Nor can you use the name "cd".&lt;BR /&gt;&lt;BR /&gt;If you set up a bin directory that doesn't allow write access to it or the files under it, you can create a script there called mycd:&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;cd $HOME/$1&lt;BR /&gt;exec /usr/bin/rsh&lt;BR /&gt;&lt;BR /&gt;Then you can just use "mycd directory-path".&lt;BR /&gt;&lt;BR /&gt;Unfortunately you will fork a new rsh each time you use this script:&lt;BR /&gt;yuk_rsh  10169 10166   -rsh&lt;BR /&gt;yuk_rsh  10185 10169     /usr/bin/rsh</description>
      <pubDate>Thu, 13 May 2010 08:29:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/to-restrict-the-path-on-unix/m-p/4631846#M378564</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-05-13T08:29:43Z</dc:date>
    </item>
  </channel>
</rss>

