<?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 prevent a users from using a specific command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573941#M228657</link>
    <description>Sorry. You can cannot control by putting /sbin/tar as an alias.&lt;BR /&gt;&lt;BR /&gt;You can try with another way by writing a shell wrapper as,&lt;BR /&gt; &lt;BR /&gt;  mv /sbin/tar /sbin/tar.org&lt;BR /&gt;&lt;BR /&gt;  #!/bin/ksh&lt;BR /&gt;  &lt;BR /&gt;  if [[ $LOGNAME = "&lt;USERNAME&gt;" ]]&lt;BR /&gt;  then&lt;BR /&gt;     echo "Permission Denied"&lt;BR /&gt;     exit 1&lt;BR /&gt;  else&lt;BR /&gt;     /sbin/tar.org $@&lt;BR /&gt;  fi&lt;BR /&gt; &lt;BR /&gt; exit 0&lt;BR /&gt; #&lt;BR /&gt; &lt;BR /&gt;save this file as /sbin/tar with bin:bin -r-xr-xr-x permission.&lt;BR /&gt;&lt;BR /&gt;hth.   &lt;BR /&gt;      &lt;BR /&gt;    &lt;BR /&gt;&lt;BR /&gt;&lt;/USERNAME&gt;</description>
    <pubDate>Thu, 30 Jun 2005 06:42:30 GMT</pubDate>
    <dc:creator>Muthukumar_5</dc:creator>
    <dc:date>2005-06-30T06:42:30Z</dc:date>
    <item>
      <title>How to prevent a users from using a specific command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573935#M228651</link>
      <description>How I can prohibit the use of a command by a user (for example tar) ?</description>
      <pubDate>Thu, 30 Jun 2005 04:59:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573935#M228651</guid>
      <dc:creator>Mouad_1</dc:creator>
      <dc:date>2005-06-30T04:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent a users from using a specific command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573936#M228652</link>
      <description>Put an alias for tar in the user's .profile that points to a null command or write a wrapper script for tar that checks the userid before invoking the real tar.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 30 Jun 2005 05:02:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573936#M228652</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2005-06-30T05:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent a users from using a specific command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573937#M228653</link>
      <description>Thanks a lot Pete. &lt;BR /&gt;I put &lt;BR /&gt;alias tar=''&lt;BR /&gt;in the .profile of the users&lt;BR /&gt;It works fine.</description>
      <pubDate>Thu, 30 Jun 2005 05:13:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573937#M228653</guid>
      <dc:creator>Mouad_1</dc:creator>
      <dc:date>2005-06-30T05:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent a users from using a specific command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573938#M228654</link>
      <description>The only problem with either  approach is that a knowledgeable user can work around them by invoking the real tar with the full path name of the command.  To be really secure, you would actually have to hide the real command somewhere else.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 30 Jun 2005 05:29:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573938#M228654</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2005-06-30T05:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent a users from using a specific command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573939#M228655</link>
      <description>You're right, but inserting these 2 line :&lt;BR /&gt;alias /sbin/tar='echo "not allowed :  tar"'&lt;BR /&gt;alias tar='echo "not allowed :  tar"'&lt;BR /&gt;into the .profile will do the jobs .</description>
      <pubDate>Thu, 30 Jun 2005 05:46:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573939#M228655</guid>
      <dc:creator>Mouad_1</dc:creator>
      <dc:date>2005-06-30T05:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent a users from using a specific command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573940#M228656</link>
      <description>You can control /sbin/tar execution by putting as,&lt;BR /&gt;&lt;BR /&gt;alias /sbin/tar='echo "Not allowed : tar"'&lt;BR /&gt;&lt;BR /&gt;# alias /sbin/tar='echo "not allowed : tar"'&lt;BR /&gt;sh: /sbin/tar=echo "not allowed : tar": Invalid alias name.&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Thu, 30 Jun 2005 06:35:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573940#M228656</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-06-30T06:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent a users from using a specific command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573941#M228657</link>
      <description>Sorry. You can cannot control by putting /sbin/tar as an alias.&lt;BR /&gt;&lt;BR /&gt;You can try with another way by writing a shell wrapper as,&lt;BR /&gt; &lt;BR /&gt;  mv /sbin/tar /sbin/tar.org&lt;BR /&gt;&lt;BR /&gt;  #!/bin/ksh&lt;BR /&gt;  &lt;BR /&gt;  if [[ $LOGNAME = "&lt;USERNAME&gt;" ]]&lt;BR /&gt;  then&lt;BR /&gt;     echo "Permission Denied"&lt;BR /&gt;     exit 1&lt;BR /&gt;  else&lt;BR /&gt;     /sbin/tar.org $@&lt;BR /&gt;  fi&lt;BR /&gt; &lt;BR /&gt; exit 0&lt;BR /&gt; #&lt;BR /&gt; &lt;BR /&gt;save this file as /sbin/tar with bin:bin -r-xr-xr-x permission.&lt;BR /&gt;&lt;BR /&gt;hth.   &lt;BR /&gt;      &lt;BR /&gt;    &lt;BR /&gt;&lt;BR /&gt;&lt;/USERNAME&gt;</description>
      <pubDate>Thu, 30 Jun 2005 06:42:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573941#M228657</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-06-30T06:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent a users from using a specific command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573942#M228658</link>
      <description>I've tried making alias for both command and its absolute path and it works !? :&lt;BR /&gt;$ tar cvf m.tar file*&lt;BR /&gt;not allowed : tar cvf m.tar file1 file2&lt;BR /&gt;$ /sbin/tar cvf m.tar file*&lt;BR /&gt;not allowed : tar cvf m.tar file1 file2&lt;BR /&gt;&lt;BR /&gt;Anyway, reWriting the command with a script as you said seem to be a good idea. Thanks&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Jun 2005 06:49:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573942#M228658</guid>
      <dc:creator>Mouad_1</dc:creator>
      <dc:date>2005-06-30T06:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent a users from using a specific command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573943#M228659</link>
      <description>Hi all&lt;BR /&gt;&lt;BR /&gt;Nice to work with aliases but ..... it doesn't work in subshell.&lt;BR /&gt;&lt;BR /&gt;I try this following under HP-UX 11.0 &amp;amp; 11i :&lt;BR /&gt;&lt;BR /&gt;alias ls="ls -l"&lt;BR /&gt;ls&lt;BR /&gt;ksh&lt;BR /&gt;ls&lt;BR /&gt;&lt;BR /&gt;The second ls doesn't give the same output !&lt;BR /&gt;&lt;BR /&gt;I try also -x option in alias command ... same effect.&lt;BR /&gt;&lt;BR /&gt;This solution is only valid in the current shell.&lt;BR /&gt;&lt;BR /&gt;Best regards.&lt;BR /&gt;Roland</description>
      <pubDate>Tue, 05 Jul 2005 08:09:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573943#M228659</guid>
      <dc:creator>Roland Piette</dc:creator>
      <dc:date>2005-07-05T08:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent a users from using a specific command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573944#M228660</link>
      <description>Maybe a bit far fetched,&lt;BR /&gt;but to really restrict a user and hinder him from issueing certain commands you would need to capture his login in a chroot or jail environment.&lt;BR /&gt;Another approach is followed by concepts like SELinux or role based access control (aka RBAC)&lt;BR /&gt;If you search www or knoledgebase on these topics with respect to HPUX I'm sure will find many howtos.</description>
      <pubDate>Tue, 05 Jul 2005 09:43:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573944#M228660</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2005-07-05T09:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent a users from using a specific command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573945#M228661</link>
      <description>Try setting ACL (access control list) for the binary. You can use setacl and getacl commamnds for the same. Please see manpage for more info.</description>
      <pubDate>Wed, 06 Jul 2005 00:17:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-prevent-a-users-from-using-a-specific-command/m-p/3573945#M228661</guid>
      <dc:creator>Amit Agarwal_1</dc:creator>
      <dc:date>2005-07-06T00:17:32Z</dc:date>
    </item>
  </channel>
</rss>

