<?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: How to restrict user from issuing an rm command in HP-UX? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-restrict-user-from-issuing-an-rm-command-in-hpux/m-p/6243829#M485514</link>
    <description>Hi Bill,&lt;BR /&gt;&lt;BR /&gt;The first step is to edit the file at .profile and then i add a line alias rm='/usr/bin/rm -i' as shown below.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# vi .profile&lt;BR /&gt;&amp;#27;# @(#) $Revision: 74.2 $&amp;#27;[H&lt;BR /&gt;&lt;BR /&gt;# Default (example of) super-user's .profile file&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# Do not put "." in PATH; it is a potential security breach.&lt;BR /&gt;# Do not put "/usr/local/bin" in PATH; it is a potential security breach.&lt;BR /&gt;# Example assumes /home/root exists.&lt;BR /&gt;set +u&lt;BR /&gt;&lt;BR /&gt;PATH=/usr/sbin:$PATH:/sbin:/home/root:/usr/cd0&lt;BR /&gt;alias rm='/usr/bin/rm -i'&lt;BR /&gt;&lt;BR /&gt;# Be sure that VUE does not invoke tty commands&lt;BR /&gt;&lt;BR /&gt;if [ ! "$VUE" ]; then&lt;BR /&gt;&lt;BR /&gt;# Set up the terminal:&lt;BR /&gt;if [ "$TERM" = "" ]&lt;BR /&gt;then&lt;BR /&gt;eval ` tset -s -Q -m ':?hp' `&lt;BR /&gt;else&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Second step is to change a directory to cd /usr/bin and then issue a command chmod 400 rm as shown below.&lt;BR /&gt;&lt;BR /&gt;-r-xr-xr-x 1 bin bin 81920 Feb 9 1999 rlog&lt;BR /&gt;-r-sr-xr-x 1 root bin 45056 Aug 3 1998 rlogin&lt;BR /&gt;-r-------- 2 bin bin 28672 Nov 7 1997 rm&lt;BR /&gt;-r-sr-sr-x 2 root mail 45056 Nov 7 1997 rmail&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Last step is to run the command as shown below.&lt;BR /&gt;&lt;BR /&gt;# rm chui&lt;BR /&gt;rm: chui non-existent&lt;BR /&gt;&lt;BR /&gt;Any simple menu script that only certain user not allow to used the rm command?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Chui</description>
    <pubDate>Tue, 22 Oct 2013 10:42:22 GMT</pubDate>
    <dc:creator>chui_88</dc:creator>
    <dc:date>2013-10-22T10:42:22Z</dc:date>
    <item>
      <title>How to restrict user from issuing an rm command in hpux?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-restrict-user-from-issuing-an-rm-command-in-hpux/m-p/6238687#M485495</link>
      <description>&lt;P&gt;Hi&amp;nbsp;guys,&lt;BR /&gt;&lt;BR /&gt;I would like to know whether i could restrict an user from issuing an rm command in our production servers. There is a common user used to login to our PROD servers, but we would like to restrict this user from issuing a rm command.&lt;BR /&gt;&lt;BR /&gt;Please advice me how best i can achieve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chui&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2013 11:03:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-restrict-user-from-issuing-an-rm-command-in-hpux/m-p/6238687#M485495</guid>
      <dc:creator>chui_88</dc:creator>
      <dc:date>2013-10-17T11:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict user from issuing an rm command in HP-UX?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-restrict-user-from-issuing-an-rm-command-in-hpux/m-p/6239671#M485499</link>
      <description>&lt;P&gt;What commands do you want to ALLOW?&amp;nbsp; Would this allow using the restricted shell?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would a chroot jail work for those users?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2013 22:51:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-restrict-user-from-issuing-an-rm-command-in-hpux/m-p/6239671#M485499</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2013-10-18T22:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict user from issuing an rm command in HP-UX?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-restrict-user-from-issuing-an-rm-command-in-hpux/m-p/6239799#M485500</link>
      <description>Hi Dennis,&lt;BR /&gt;&lt;BR /&gt;# rm command is not allow to used in shell prompt . No&lt;BR /&gt;Regards,&lt;BR /&gt;Chui</description>
      <pubDate>Fri, 18 Oct 2013 10:21:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-restrict-user-from-issuing-an-rm-command-in-hpux/m-p/6239799#M485500</guid>
      <dc:creator>chui_88</dc:creator>
      <dc:date>2013-10-18T10:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict user from issuing an rm command in HP-UX?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-restrict-user-from-issuing-an-rm-command-in-hpux/m-p/6239827#M485501</link>
      <description>&lt;P&gt;Please tell more about the scenario.&lt;/P&gt;&lt;P&gt;"rm" is not the only method to delete a file.&lt;/P&gt;&lt;P&gt;Remember, the user can only delete files if he is the owner (of if he has write access).&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2013 11:18:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-restrict-user-from-issuing-an-rm-command-in-hpux/m-p/6239827#M485501</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2013-10-18T11:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict user from issuing an rm command in HP-UX?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-restrict-user-from-issuing-an-rm-command-in-hpux/m-p/6240347#M485503</link>
      <description>&lt;P&gt;&amp;gt;"rm" is not the only method to delete a file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like deleting the contents.&amp;nbsp; :-)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;the user can only delete files if he is the owner (of if he has write access).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Owner on the file is only important if sticky bit is set for a directory (like /tmp and /var/tmp).&lt;/P&gt;&lt;P&gt;Otherwise write access to the directory is enough.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2013 22:50:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-restrict-user-from-issuing-an-rm-command-in-hpux/m-p/6240347#M485503</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2013-10-18T22:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict user from issuing an rm command in HP-UX?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-restrict-user-from-issuing-an-rm-command-in-hpux/m-p/6240463#M485504</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;gt;&amp;gt; Remember, the user can only delete files if he is the owner (of if he has write access).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Actually, that isn't true at all. The file's protection (owner and permission) only cover the contents of the file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The existence of a file is controlled by the directory, not the file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A file that is owned by root and zero permissions but resides in a directory that allows write access for a user, the file can be renamed or removed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As mentioned, the rm command is just one of many ways to destroy a file. If a user is improperly trained or careless, then the user should not be allowed to run a normal shell. The restricted shell is a possibility, but the ideal solution is a simple menu script that only allows certain actions. And of course this user can never be allowed to login with root privileges.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Oct 2013 00:57:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-restrict-user-from-issuing-an-rm-command-in-hpux/m-p/6240463#M485504</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2013-10-19T00:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict user from issuing an rm command in HP-UX?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-restrict-user-from-issuing-an-rm-command-in-hpux/m-p/6243829#M485514</link>
      <description>Hi Bill,&lt;BR /&gt;&lt;BR /&gt;The first step is to edit the file at .profile and then i add a line alias rm='/usr/bin/rm -i' as shown below.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# vi .profile&lt;BR /&gt;&amp;#27;# @(#) $Revision: 74.2 $&amp;#27;[H&lt;BR /&gt;&lt;BR /&gt;# Default (example of) super-user's .profile file&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# Do not put "." in PATH; it is a potential security breach.&lt;BR /&gt;# Do not put "/usr/local/bin" in PATH; it is a potential security breach.&lt;BR /&gt;# Example assumes /home/root exists.&lt;BR /&gt;set +u&lt;BR /&gt;&lt;BR /&gt;PATH=/usr/sbin:$PATH:/sbin:/home/root:/usr/cd0&lt;BR /&gt;alias rm='/usr/bin/rm -i'&lt;BR /&gt;&lt;BR /&gt;# Be sure that VUE does not invoke tty commands&lt;BR /&gt;&lt;BR /&gt;if [ ! "$VUE" ]; then&lt;BR /&gt;&lt;BR /&gt;# Set up the terminal:&lt;BR /&gt;if [ "$TERM" = "" ]&lt;BR /&gt;then&lt;BR /&gt;eval ` tset -s -Q -m ':?hp' `&lt;BR /&gt;else&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Second step is to change a directory to cd /usr/bin and then issue a command chmod 400 rm as shown below.&lt;BR /&gt;&lt;BR /&gt;-r-xr-xr-x 1 bin bin 81920 Feb 9 1999 rlog&lt;BR /&gt;-r-sr-xr-x 1 root bin 45056 Aug 3 1998 rlogin&lt;BR /&gt;-r-------- 2 bin bin 28672 Nov 7 1997 rm&lt;BR /&gt;-r-sr-sr-x 2 root mail 45056 Nov 7 1997 rmail&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Last step is to run the command as shown below.&lt;BR /&gt;&lt;BR /&gt;# rm chui&lt;BR /&gt;rm: chui non-existent&lt;BR /&gt;&lt;BR /&gt;Any simple menu script that only certain user not allow to used the rm command?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Chui</description>
      <pubDate>Tue, 22 Oct 2013 10:42:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-restrict-user-from-issuing-an-rm-command-in-hpux/m-p/6243829#M485514</guid>
      <dc:creator>chui_88</dc:creator>
      <dc:date>2013-10-22T10:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict user from issuing an rm command in HP-UX?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-restrict-user-from-issuing-an-rm-command-in-hpux/m-p/6244025#M485515</link>
      <description>&lt;P&gt;What if I as a user run /sbin/rm ?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2013 13:07:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-restrict-user-from-issuing-an-rm-command-in-hpux/m-p/6244025#M485515</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2013-10-22T13:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict user from issuing an rm command in HP-UX?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-restrict-user-from-issuing-an-rm-command-in-hpux/m-p/6244067#M485516</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;gt;&amp;gt; Second step is to change a directory to cd /usr/bin and then issue a command chmod 400 rm as shown below.&lt;/SPAN&gt;&lt;BR /&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; -r-------- 2 bin bin 28672 Nov 7 1997 rm&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You have just destroyed the rm command for every user including root. True, if root is logged in, then the root user may change the permission back again. However, there are dozens of programs and scripts that use the rm command and they will start failing once you do this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Removing the rm command is the wrong way to fix the real issue. It will make your system very unreliable and still the untrained (untrustworthy?) user is free to use other commands to destroy files and directories. This user must not be allowed to logon to the system at all, or given a simple menu to perform their tasks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Attached is a simple menu script. Replace the user's shell in /etc/passwd with this script. To add additional features, you'll need some scripting skills.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2013 13:55:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-restrict-user-from-issuing-an-rm-command-in-hpux/m-p/6244067#M485516</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2013-10-22T13:55:49Z</dc:date>
    </item>
  </channel>
</rss>

