<?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: HELP*** HP-UX Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/help-hp-ux-script/m-p/2560508#M918451</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;No apparently solution , but you can modify the  /etc/profile to meed your requirement :&lt;BR /&gt;&lt;BR /&gt;Add the following to you /etc/profile :&lt;BR /&gt;-=-=-=-=-= &lt;BR /&gt;trap "" 1 2 3&lt;BR /&gt;&lt;BR /&gt;        nuser=`who | grep $LOGNAME | wc -l`;&lt;BR /&gt;        if test "$nuser" -gt 2&lt;BR /&gt;        then&lt;BR /&gt;                exit&lt;BR /&gt;        fi&lt;BR /&gt;&lt;BR /&gt;trap 1 2 3&lt;BR /&gt;&lt;BR /&gt;-=-=-=-=-=-=&lt;BR /&gt;&lt;BR /&gt;It should work.&lt;BR /&gt;Hope this solve your question.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 02 Aug 2001 10:16:34 GMT</pubDate>
    <dc:creator>Frank Li</dc:creator>
    <dc:date>2001-08-02T10:16:34Z</dc:date>
    <item>
      <title>HELP*** HP-UX Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-hp-ux-script/m-p/2560506#M918449</link>
      <description>Dear All,&lt;BR /&gt;&lt;BR /&gt;Anyone can help me about how to restricted open session (telnet) for each user.&lt;BR /&gt;I want to allow 2 session only for each user.&lt;BR /&gt;Any tools or script solve my problem.&lt;BR /&gt;Many thanks in advance for your help.&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;ES</description>
      <pubDate>Thu, 02 Aug 2001 09:38:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-hp-ux-script/m-p/2560506#M918449</guid>
      <dc:creator>Edi Simanjuntak</dc:creator>
      <dc:date>2001-08-02T09:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: HELP*** HP-UX Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-hp-ux-script/m-p/2560507#M918450</link>
      <description>I'm assuming this will go into /etc/profile, (though it could go into .profile)&lt;BR /&gt;&lt;BR /&gt;usr=$(whoami)&lt;BR /&gt;case $usr in&lt;BR /&gt;&lt;BR /&gt;# Put special users here&lt;BR /&gt;        root|informix)  echo "Special users go on in"&lt;BR /&gt;        ;;&lt;BR /&gt;&lt;BR /&gt;        *) if [ $(who | grep $usr | wc -l) -gt 2 ]&lt;BR /&gt;        then&lt;BR /&gt;                echo "You are already logged in.  Your sessions are"&lt;BR /&gt;                who | grep $usr&lt;BR /&gt;                exit&lt;BR /&gt;        fi&lt;BR /&gt;                ;;&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;Give it a whirl&lt;BR /&gt;&lt;BR /&gt;Tim</description>
      <pubDate>Thu, 02 Aug 2001 10:13:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-hp-ux-script/m-p/2560507#M918450</guid>
      <dc:creator>Tim D Fulford</dc:creator>
      <dc:date>2001-08-02T10:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: HELP*** HP-UX Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-hp-ux-script/m-p/2560508#M918451</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;No apparently solution , but you can modify the  /etc/profile to meed your requirement :&lt;BR /&gt;&lt;BR /&gt;Add the following to you /etc/profile :&lt;BR /&gt;-=-=-=-=-= &lt;BR /&gt;trap "" 1 2 3&lt;BR /&gt;&lt;BR /&gt;        nuser=`who | grep $LOGNAME | wc -l`;&lt;BR /&gt;        if test "$nuser" -gt 2&lt;BR /&gt;        then&lt;BR /&gt;                exit&lt;BR /&gt;        fi&lt;BR /&gt;&lt;BR /&gt;trap 1 2 3&lt;BR /&gt;&lt;BR /&gt;-=-=-=-=-=-=&lt;BR /&gt;&lt;BR /&gt;It should work.&lt;BR /&gt;Hope this solve your question.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Aug 2001 10:16:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-hp-ux-script/m-p/2560508#M918451</guid>
      <dc:creator>Frank Li</dc:creator>
      <dc:date>2001-08-02T10:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: HELP*** HP-UX Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-hp-ux-script/m-p/2560509#M918452</link>
      <description>&lt;BR /&gt;See&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xfea3663ce855d511abcd0090277a778c,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xfea3663ce855d511abcd0090277a778c,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Aug 2001 13:10:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-hp-ux-script/m-p/2560509#M918452</guid>
      <dc:creator>Victor_5</dc:creator>
      <dc:date>2001-08-02T13:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: HELP*** HP-UX Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-hp-ux-script/m-p/2560510#M918453</link>
      <description>It seems that everyone has the same basic idea. A scheme I've used is to first determine if the account has a uid greater than 100. If so, check to see if the username appears in a bypass list. If not, see if the user is already on twice. At the end of /etc/profile, I used&lt;BR /&gt;&lt;BR /&gt;if [ $(id -u) -gt 100 ]; then&lt;BR /&gt;if ! $(grep -q $LOGNAME /etc/bypass); then&lt;BR /&gt;if [ $(wc -h $LOGNAME | wc -l) -gt 2 ]; then&lt;BR /&gt;cat &amp;lt;&amp;lt;.&lt;BR /&gt;&lt;BR /&gt;I'm sorry. You're already on twice. Goodbye!&lt;BR /&gt;&lt;BR /&gt;.&lt;BR /&gt;fi&lt;BR /&gt;fi&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Naturally, we've only accounted for users of the posix, korn, and bourne-again shells.&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Aug 2001 18:27:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-hp-ux-script/m-p/2560510#M918453</guid>
      <dc:creator>Jordan Bean</dc:creator>
      <dc:date>2001-08-02T18:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: HELP*** HP-UX Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-hp-ux-script/m-p/2560511#M918454</link>
      <description>I forgot to 'exit' after the rude message.</description>
      <pubDate>Thu, 02 Aug 2001 18:29:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-hp-ux-script/m-p/2560511#M918454</guid>
      <dc:creator>Jordan Bean</dc:creator>
      <dc:date>2001-08-02T18:29:58Z</dc:date>
    </item>
  </channel>
</rss>

