<?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: Limiting a Path for a user with rksh in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/limiting-a-path-for-a-user-with-rksh/m-p/2832663#M89259</link>
    <description>For only restrctive FTP u need to do a man ftpdacees and a man chroot to know more seeting up toe xcite the command in .profile etc will not work in FTP because it doesnt work the way normal login works .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava</description>
    <pubDate>Fri, 25 Oct 2002 14:13:49 GMT</pubDate>
    <dc:creator>MANOJ SRIVASTAVA</dc:creator>
    <dc:date>2002-10-25T14:13:49Z</dc:date>
    <item>
      <title>Limiting a Path for a user with rksh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/limiting-a-path-for-a-user-with-rksh/m-p/2832657#M89253</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have 10 users, each with their own Unix ID going to this directory&lt;BR /&gt;under rksh:&lt;BR /&gt;&lt;BR /&gt;+test1::0:0:test1 tester:/files/legal/output:/bin/rksh&lt;BR /&gt;+test2::0:0:test2 tester:/files/legal/output:/bin/rksh&lt;BR /&gt;+test3::0:0:test3 tester:/files/legal/output:/bin/rksh&lt;BR /&gt;+test4::0:0:test4 tester:/files/legal/output:/bin/rksh&lt;BR /&gt;etc...10&lt;BR /&gt;&lt;BR /&gt;rksh prevent change of directory - but they still have access to&lt;BR /&gt;everything in their path.&lt;BR /&gt;&lt;BR /&gt;Is there a way to put a .profile file or something that would alter&lt;BR /&gt;the path so they could not use everything in their path?&lt;BR /&gt;&lt;BR /&gt;I tried this:&lt;BR /&gt;&lt;BR /&gt;PATH=`echo "$PATH" | sed 's=:/usr/tools/bin:=:=g'`&lt;BR /&gt;export PATH&lt;BR /&gt;&lt;BR /&gt;in a .profile file but would that not have to be shared by all users,&lt;BR /&gt;or 1 created for each?  How would I get this .profile to execute for&lt;BR /&gt;each user?&lt;BR /&gt;&lt;BR /&gt;Or any other suggestions?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The path:&lt;BR /&gt;&lt;BR /&gt;echo $PATH&lt;BR /&gt;/home/test1/bin:/usr/tools/bin:/usr/bin:/opt/corp/bin:&lt;BR /&gt;&lt;BR /&gt;This path is defaulted for everyone - and I am not sure where it is&lt;BR /&gt;assigned.&lt;BR /&gt;&lt;BR /&gt;I just want to restrict users who have logged into&lt;BR /&gt;/files/legal/output:/bin/rksh&lt;BR /&gt;   to NOT have access /usr/tools/bin.&lt;BR /&gt;&lt;BR /&gt;Help?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;V</description>
      <pubDate>Thu, 24 Oct 2002 13:00:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/limiting-a-path-for-a-user-with-rksh/m-p/2832657#M89253</guid>
      <dc:creator>Victor Prasad</dc:creator>
      <dc:date>2002-10-24T13:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting a Path for a user with rksh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/limiting-a-path-for-a-user-with-rksh/m-p/2832658#M89254</link>
      <description>Hi V&lt;BR /&gt;&lt;BR /&gt;May be this can help : &lt;BR /&gt;&lt;BR /&gt;10.3.1 Restricted Shell &lt;BR /&gt;The restricted shell is designed to put the user into an environment where his or her ability to move around and write files is severely limited. It's usually used for "guest" accounts. You can make a user's login shell restricted by putting rksh or ksh -r in the user's /etc/passwd entry. &lt;BR /&gt;&lt;BR /&gt;The specific constraints imposed by the restricted shell disallow the user from doing the following: &lt;BR /&gt;&lt;BR /&gt;Changing working directories: cd is inoperative. If you try to use it, you will get the error message "ksh: cd: restricted". &lt;BR /&gt;&lt;BR /&gt;Redirecting output to a file: the redirectors &amp;gt;, &amp;gt;|, &amp;lt;&amp;gt;, and &amp;gt;&amp;gt; are not allowed. &lt;BR /&gt;&lt;BR /&gt;Assigning a new value to the environment variables SHELL, ENV, or PATH. &lt;BR /&gt;&lt;BR /&gt;Specifying any pathnames with slashes (/) in them. The shell will treat files outside of the current directory as "not found." &lt;BR /&gt;&lt;BR /&gt;These restrictions go into effect after the user's .profile and environment files are run. &lt;BR /&gt;&lt;BR /&gt;This means that the restricted shell user's entire environment is set up in .profile. Since the user can't overwrite that file, this lets the system administrator configure the environment as he or she sees fit. &lt;BR /&gt;&lt;BR /&gt;Two common ways of setting up such environments are to set up a directory of "safe" commands and have that directory be the only one in PATH, and to set up a command menu from which the user can't escape without exiting the shell. &lt;BR /&gt;&lt;BR /&gt;you may also look at : &lt;BR /&gt;&lt;A href="http://nevada.tpi.pl/books/b022/ch10_03.htm" target="_blank"&gt;http://nevada.tpi.pl/books/b022/ch10_03.htm&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;and &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://google.yahoo.com/bin/query?p=restrict+ls+in+rksh&amp;amp;hc=0&amp;amp;hs=0" target="_blank"&gt;http://google.yahoo.com/bin/query?p=restrict+ls+in+rksh&amp;amp;hc=0&amp;amp;hs=0&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;All the best . &lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava &lt;BR /&gt;</description>
      <pubDate>Thu, 24 Oct 2002 13:24:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/limiting-a-path-for-a-user-with-rksh/m-p/2832658#M89254</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2002-10-24T13:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting a Path for a user with rksh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/limiting-a-path-for-a-user-with-rksh/m-p/2832659#M89255</link>
      <description>Thank you for the info.&lt;BR /&gt;&lt;BR /&gt;1) where would I find the ENV info?&lt;BR /&gt;&lt;BR /&gt;2)  Since there are 10 (or more users) going into this directory - I woulld have to have a separate .profile for each?  Or once the login - is the .profile for that directory execusted?&lt;BR /&gt;Please can the users not alter their .profile or chmod it?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;V</description>
      <pubDate>Thu, 24 Oct 2002 15:06:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/limiting-a-path-for-a-user-with-rksh/m-p/2832659#M89255</guid>
      <dc:creator>Victor Prasad</dc:creator>
      <dc:date>2002-10-24T15:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting a Path for a user with rksh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/limiting-a-path-for-a-user-with-rksh/m-p/2832660#M89256</link>
      <description>Hi Victor&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;For the users you need to find a comman command set like ls , rm etc and copy these commands in a subdirecorty which become the path in the .profile of the users login home ( restricted etc ) now once  this is excuted the user can only run the commnads set up in that directory.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava</description>
      <pubDate>Thu, 24 Oct 2002 16:08:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/limiting-a-path-for-a-user-with-rksh/m-p/2832660#M89256</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2002-10-24T16:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting a Path for a user with rksh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/limiting-a-path-for-a-user-with-rksh/m-p/2832661#M89257</link>
      <description>Thanks for the info yet again!&lt;BR /&gt;&lt;BR /&gt;The problem I having is, users are setup to go to a directory - there is no .profile in that directory.  I think they get their defaulted path from /etc a file called PATH.  But this PATH is used for many other users.  Unfortunately - I cannot change the directory /files/legal/output either.&lt;BR /&gt;&lt;BR /&gt;I was also thinking of these ideas:&lt;BR /&gt;&lt;BR /&gt;1)  Could I change this directory to be ftp only?  If so - how?&lt;BR /&gt;&lt;BR /&gt;2)  Could I change the the login to have the path be altered first then send them to the directory?&lt;BR /&gt;&lt;BR /&gt;i.e.&lt;BR /&gt;&lt;BR /&gt;Instead of +test1::0:0:test1 tester:/files/legal/output:/bin/rksh&lt;BR /&gt;send them to +test1::0:0:test1 tester:/files/legal/output:/bin/SCRIPT&lt;BR /&gt;&lt;BR /&gt;Where the SCRIPT changes the path and gives them rksh access?  &lt;BR /&gt;&lt;BR /&gt;I am really not sure how to do that - if it is possible.&lt;BR /&gt;&lt;BR /&gt;Any other suggestions?&lt;BR /&gt;&lt;BR /&gt;Thanks for your help and time,&lt;BR /&gt;&lt;BR /&gt;V&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Oct 2002 13:42:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/limiting-a-path-for-a-user-with-rksh/m-p/2832661#M89257</guid>
      <dc:creator>Victor Prasad</dc:creator>
      <dc:date>2002-10-25T13:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting a Path for a user with rksh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/limiting-a-path-for-a-user-with-rksh/m-p/2832662#M89258</link>
      <description>Victor,&lt;BR /&gt;&lt;BR /&gt;One way to restrict what commands a user has access to is to give them access to a path that contains only the commands you have given them acess to, but man that has got to be painfully a manual process. The biggest problem is that many commands rely on the existence of others. Why not just give them access to a menu that gives them access to commands.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Fri, 25 Oct 2002 14:04:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/limiting-a-path-for-a-user-with-rksh/m-p/2832662#M89258</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-10-25T14:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting a Path for a user with rksh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/limiting-a-path-for-a-user-with-rksh/m-p/2832663#M89259</link>
      <description>For only restrctive FTP u need to do a man ftpdacees and a man chroot to know more seeting up toe xcite the command in .profile etc will not work in FTP because it doesnt work the way normal login works .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava</description>
      <pubDate>Fri, 25 Oct 2002 14:13:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/limiting-a-path-for-a-user-with-rksh/m-p/2832663#M89259</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2002-10-25T14:13:49Z</dc:date>
    </item>
  </channel>
</rss>

