<?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: User Session in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/user-session/m-p/3370897#M195591</link>
    <description>With the latest security patches on 11.0 or 11.11 (specifically patches for /usr/bin/login), you can put this into /etc/default/security:&lt;BR /&gt; &lt;BR /&gt;NUMBER_OF_LOGINS_ALLOWED=1&lt;BR /&gt;</description>
    <pubDate>Thu, 02 Sep 2004 09:19:46 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2004-09-02T09:19:46Z</dc:date>
    <item>
      <title>User Session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-session/m-p/3370896#M195590</link>
      <description>Hi guys..&lt;BR /&gt;how is it possible, if is it, to limit a user to only one session per time?.. I want that a particular user runs a single session, not more than one at the same time.&lt;BR /&gt;&lt;BR /&gt;thanx.&lt;BR /&gt;&lt;BR /&gt;st.</description>
      <pubDate>Thu, 02 Sep 2004 09:15:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-session/m-p/3370896#M195590</guid>
      <dc:creator>Stefano_65</dc:creator>
      <dc:date>2004-09-02T09:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: User Session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-session/m-p/3370897#M195591</link>
      <description>With the latest security patches on 11.0 or 11.11 (specifically patches for /usr/bin/login), you can put this into /etc/default/security:&lt;BR /&gt; &lt;BR /&gt;NUMBER_OF_LOGINS_ALLOWED=1&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Sep 2004 09:19:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-session/m-p/3370897#M195591</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2004-09-02T09:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: User Session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-session/m-p/3370898#M195592</link>
      <description>Note: this is for ALL users except root. For a single user to be restricted, you'll need to script the test in /etc/profile or /etc/csh.login.</description>
      <pubDate>Thu, 02 Sep 2004 09:21:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-session/m-p/3370898#M195592</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2004-09-02T09:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: User Session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-session/m-p/3370899#M195593</link>
      <description>thanx dude&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Sep 2004 09:27:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-session/m-p/3370899#M195593</guid>
      <dc:creator>Stefano_65</dc:creator>
      <dc:date>2004-09-02T09:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: User Session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-session/m-p/3370900#M195594</link>
      <description>&lt;BR /&gt;--&lt;BR /&gt;Note: this is for ALL users except root. For a single user to be restricted, you'll need to script the test in /etc/profile or /etc/csh.login. &lt;BR /&gt;--&lt;BR /&gt;&lt;BR /&gt;ehm.. but how I can do that?&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Sep 2004 09:34:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-session/m-p/3370900#M195594</guid>
      <dc:creator>Stefano_65</dc:creator>
      <dc:date>2004-09-02T09:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: User Session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-session/m-p/3370901#M195595</link>
      <description>For POSIX shell, ksh, bash, etc users, add this at the top of /etc/profile just after the trap statement:&lt;BR /&gt; &lt;BR /&gt;for ONESESS in bill joe carol jenny&lt;BR /&gt;do&lt;BR /&gt;CURRLOGIN=$(who -u | grep -c ^$ONESESS)&lt;BR /&gt;if [ $CURRLOGIN -ge 2 -a $(id -un) = $ONESESS ]&lt;BR /&gt;then&lt;BR /&gt;echo "\n\nNo more sessions allowed:"&lt;BR /&gt;ps -f -u $ONESESS&lt;BR /&gt;sleep 5&lt;BR /&gt;exit&lt;BR /&gt;fi&lt;BR /&gt; &lt;BR /&gt;where: bill joe carol jenny &lt;BR /&gt;are the users that are only allowed 1 session. Expand/change that list as needed.</description>
      <pubDate>Thu, 02 Sep 2004 11:19:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-session/m-p/3370901#M195595</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2004-09-02T11:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: User Session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-session/m-p/3370902#M195596</link>
      <description>There is a done missing at the end of the above script excerpt.&lt;BR /&gt;&lt;BR /&gt;Here is an alternate way of doing it&lt;BR /&gt;&lt;BR /&gt;define all the users in a file say /etc/ONLYSINGLESES&lt;BR /&gt;&lt;BR /&gt;# vi /etc/ONLYSINGLESES&lt;BR /&gt;user1&lt;BR /&gt;user2&lt;BR /&gt;user3&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;# vi /etc/profile&lt;BR /&gt;&lt;BR /&gt;grep -qi "^${LOGNAME}$" /etc/ONLYSINGLESES &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;if [ $? -eq 0 ]&lt;BR /&gt;then&lt;BR /&gt;  COUNT=$(who -u | grep "^$LOGNAME " | wc -l)&lt;BR /&gt;  if [[ $COUNT -gt 1 ]]&lt;BR /&gt;  then&lt;BR /&gt;    echo "Only one session allowed for user: $LOGNAME"&lt;BR /&gt;    sleep 2&lt;BR /&gt;    exit&lt;BR /&gt;  fi&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;couple of advantages to the above excerpt&lt;BR /&gt;&lt;BR /&gt;1) You dont have to execute the loop for all the users all the time.&lt;BR /&gt;&lt;BR /&gt;2) You can dynamically define the list in the file than having to edit the script when the changes are to be mode. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Sep 2004 11:47:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-session/m-p/3370902#M195596</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2004-09-02T11:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: User Session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-session/m-p/3370903#M195597</link>
      <description>thanx guys!!!!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Sep 2004 03:49:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-session/m-p/3370903#M195597</guid>
      <dc:creator>Stefano_65</dc:creator>
      <dc:date>2004-09-10T03:49:16Z</dc:date>
    </item>
  </channel>
</rss>

