<?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: disconnect a user in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/disconnect-a-user/m-p/2845235#M92052</link>
    <description>Sorry - missed the USERNAME in my cut and paste:&lt;BR /&gt;&lt;BR /&gt;USERNAME=$1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;should be at the beginning.&lt;BR /&gt;&lt;BR /&gt;Pete</description>
    <pubDate>Thu, 14 Nov 2002 19:19:34 GMT</pubDate>
    <dc:creator>Pete Randall</dc:creator>
    <dc:date>2002-11-14T19:19:34Z</dc:date>
    <item>
      <title>disconnect a user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disconnect-a-user/m-p/2845232#M92049</link>
      <description>Hi,&lt;BR /&gt;I need some help with a shell script I'm writing.  How do you disconnect a user?  This script is to keep users from getting to the command line.  If they sign on, the script should tell them to use the other interface then disconnect them.&lt;BR /&gt;Thanks in advance!</description>
      <pubDate>Thu, 14 Nov 2002 19:11:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disconnect-a-user/m-p/2845232#M92049</guid>
      <dc:creator>Greta Blamire</dc:creator>
      <dc:date>2002-11-14T19:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: disconnect a user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disconnect-a-user/m-p/2845233#M92050</link>
      <description>If the "other interface" is an application then simply make that application the startup program in the passwd file and your users will never see the shell or make their startup program something like /usr/bin/false.&lt;BR /&gt;&lt;BR /&gt;The other simple answer is&lt;BR /&gt;in their .profile&lt;BR /&gt;&lt;BR /&gt;trap '' 0 1 2 3 15&lt;BR /&gt;&lt;BR /&gt;echo "Do not use the shell"&lt;BR /&gt;sleep 5&lt;BR /&gt;exit 0&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Nov 2002 19:11:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disconnect-a-user/m-p/2845233#M92050</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-11-14T19:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: disconnect a user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disconnect-a-user/m-p/2845234#M92051</link>
      <description>Something like this perhaps?&lt;BR /&gt;&lt;BR /&gt;ps -ef | grep ' '$USERNAME' ' | grep -v "resetuser" | awk '{ print $1,$2 }'&lt;BR /&gt;&amp;gt; /tmp/reset.tmp&lt;BR /&gt;    PROCESSES=`grep $USERNAME /tmp/reset.tmp | awk '{ print $2 }' | sort -n`&lt;BR /&gt;    for PROC in $PROCESSES&lt;BR /&gt;    do&lt;BR /&gt;       echo "\tKilling process $PROC"&lt;BR /&gt;       kill $PROC&lt;BR /&gt;    done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 14 Nov 2002 19:17:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disconnect-a-user/m-p/2845234#M92051</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-11-14T19:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: disconnect a user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disconnect-a-user/m-p/2845235#M92052</link>
      <description>Sorry - missed the USERNAME in my cut and paste:&lt;BR /&gt;&lt;BR /&gt;USERNAME=$1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;should be at the beginning.&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 14 Nov 2002 19:19:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disconnect-a-user/m-p/2845235#M92052</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-11-14T19:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: disconnect a user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disconnect-a-user/m-p/2845236#M92053</link>
      <description>HI&lt;BR /&gt;Call the script/menu you need from users .profile with last line as "exit 0"&lt;BR /&gt;&lt;BR /&gt;or make that script/program as a start-up shell for the user.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;Prashant.</description>
      <pubDate>Thu, 14 Nov 2002 19:19:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disconnect-a-user/m-p/2845236#M92053</guid>
      <dc:creator>Deshpande Prashant</dc:creator>
      <dc:date>2002-11-14T19:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: disconnect a user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disconnect-a-user/m-p/2845237#M92054</link>
      <description>Hi Greta:&lt;BR /&gt;&lt;BR /&gt;I think the better approach is to make their startup script the "other interface" rather than a shell.&lt;BR /&gt;&lt;BR /&gt;You can do this by substituting the script or executable for a shell in '/etc/passwd'.&lt;BR /&gt;&lt;BR /&gt;You can also do this by 'exec'ing the interface as the last statement in the user's profile:&lt;BR /&gt;&lt;BR /&gt;exec $HOME/interface&lt;BR /&gt;&lt;BR /&gt;The first method is more rigorous in most cases.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 14 Nov 2002 19:20:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disconnect-a-user/m-p/2845237#M92054</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-11-14T19:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: disconnect a user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disconnect-a-user/m-p/2845238#M92055</link>
      <description>The interface that all users should use is a seperate thin client application.  This is just insurance if someone starts exploring and manages to telnet in.  Clay's script works great, just cut them off immediately. Thanks Again!</description>
      <pubDate>Thu, 14 Nov 2002 19:34:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disconnect-a-user/m-p/2845238#M92055</guid>
      <dc:creator>Greta Blamire</dc:creator>
      <dc:date>2002-11-14T19:34:39Z</dc:date>
    </item>
  </channel>
</rss>

