<?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: Is there an easy way to limit concurrent login sessions? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/is-there-an-easy-way-to-limit-concurrent-login-sessions/m-p/2417250#M757694</link>
    <description>I am not sure of any inbuilt way of HP-UX to prevent a user from logging in more than one session concurrently. What i will do is, add the below lines into /etc/profile to check if the user is already logged in and if thats the case, don't let them log in again. Like...&lt;BR /&gt;&lt;BR /&gt;LOGIN_SESS=`who | grep $LOGNAME | wc -l` &lt;BR /&gt; if ( $LOGIN_SESS &amp;gt;= 1 )&lt;BR /&gt;  then&lt;BR /&gt;    echo "You are already logged on this system."&lt;BR /&gt;    echo "No more sessions allowed."&lt;BR /&gt;  exit&lt;BR /&gt; fi&lt;BR /&gt;&lt;BR /&gt;User can always modify it though.</description>
    <pubDate>Wed, 21 Mar 2007 23:48:30 GMT</pubDate>
    <dc:creator>Anshumali</dc:creator>
    <dc:date>2007-03-21T23:48:30Z</dc:date>
    <item>
      <title>Is there an easy way to limit concurrent login sessions?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/is-there-an-easy-way-to-limit-concurrent-login-sessions/m-p/2417242#M757686</link>
      <description>I am in need of an easy way to limit the number of concurrent login session any &lt;BR /&gt;given user can have. If anyone knows, please respond to my email address and/or &lt;BR /&gt;post in this forum. Thank you.</description>
      <pubDate>Wed, 05 Jan 2000 14:05:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/is-there-an-easy-way-to-limit-concurrent-login-sessions/m-p/2417242#M757686</guid>
      <dc:creator>Peter Floyd_1</dc:creator>
      <dc:date>2000-01-05T14:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an easy way to limit concurrent login sessions?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/is-there-an-easy-way-to-limit-concurrent-login-sessions/m-p/2417243#M757687</link>
      <description>Hello there,&lt;BR /&gt;&lt;BR /&gt;In your /etc/profile add the following lines &lt;BR /&gt;&lt;BR /&gt;USER=$(whoami)&lt;BR /&gt;NBCNX=`who -H | grep ${USER} | grep -v root | wc -l`&lt;BR /&gt;&lt;BR /&gt;if [ ${NBCNX} -gt 2 ]&lt;BR /&gt;then &lt;BR /&gt;echo "MSG login restrited"&lt;BR /&gt;exit&lt;BR /&gt;fi &lt;BR /&gt;&lt;BR /&gt;regards</description>
      <pubDate>Thu, 06 Jan 2000 01:30:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/is-there-an-easy-way-to-limit-concurrent-login-sessions/m-p/2417243#M757687</guid>
      <dc:creator>Charles Guiocheau</dc:creator>
      <dc:date>2000-01-06T01:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an easy way to limit concurrent login sessions?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/is-there-an-easy-way-to-limit-concurrent-login-sessions/m-p/2417244#M757688</link>
      <description>The easy way i can suggest is to write a few lines script which count for &lt;BR /&gt;number of $LOGNAME for that login id and exit if it is above your limit. Call &lt;BR /&gt;this script thro' /etc/profile.&lt;BR /&gt;Hope this helps you.</description>
      <pubDate>Thu, 06 Jan 2000 01:34:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/is-there-an-easy-way-to-limit-concurrent-login-sessions/m-p/2417244#M757688</guid>
      <dc:creator>R Madhavan_1</dc:creator>
      <dc:date>2000-01-06T01:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an easy way to limit concurrent login sessions?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/is-there-an-easy-way-to-limit-concurrent-login-sessions/m-p/2417245#M757689</link>
      <description>another easy response for your question, add the next pharagraph in the file &lt;BR /&gt;/etc/profile&lt;BR /&gt;&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;  trap 1 2 3&lt;BR /&gt;if [ "$LOGNAME" != "root" ]&lt;BR /&gt;   then&lt;BR /&gt;     if [ `who -u | awk ?{ print $1}?|grep "$LOGNAME" &lt;BR /&gt;        | wc -l ` -gt 1 ]&lt;BR /&gt;     then&lt;BR /&gt;     clear&lt;BR /&gt;     echo "Number of Conecctions Exceeded"&lt;BR /&gt;     echo "CONECTION REFUSED"&lt;BR /&gt;     exit&lt;BR /&gt;   fi&lt;BR /&gt;fi&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards.&lt;BR /&gt;</description>
      <pubDate>Thu, 06 Jan 2000 15:42:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/is-there-an-easy-way-to-limit-concurrent-login-sessions/m-p/2417245#M757689</guid>
      <dc:creator>Javier Juarez_2</dc:creator>
      <dc:date>2000-01-06T15:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an easy way to limit concurrent login sessions?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/is-there-an-easy-way-to-limit-concurrent-login-sessions/m-p/2417246#M757690</link>
      <description>Hi there,&lt;BR /&gt;&lt;BR /&gt;You can set NUMBER_OF_LOGINS_ALLOWED in /etc/default/security file. &lt;BR /&gt;&lt;BR /&gt;$ man 4 security&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;NUMBER_OF_LOGINS_ALLOWED&lt;BR /&gt;This parameter controls the number of simultaneous logins allowed per user.  This is applicable only for non-root users.&lt;BR /&gt;&lt;BR /&gt;   NUMBER_OF_LOGINS_ALLOWED=0   Any number of logins are allowed per user.&lt;BR /&gt;   NUMBER_OF_LOGINS_ALLOWED=N   N number of logins are allowed per user.&lt;BR /&gt;&lt;BR /&gt;   Default value: NUMBER_OF_LOGINS_ALLOWED=0&lt;BR /&gt;-----------&lt;BR /&gt;&lt;BR /&gt;Hope this helps.</description>
      <pubDate>Wed, 21 Mar 2007 01:07:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/is-there-an-easy-way-to-limit-concurrent-login-sessions/m-p/2417246#M757690</guid>
      <dc:creator>PC_7</dc:creator>
      <dc:date>2007-03-21T01:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an easy way to limit concurrent login sessions?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/is-there-an-easy-way-to-limit-concurrent-login-sessions/m-p/2417247#M757691</link>
      <description>You could use IPFilter system firewall to &lt;BR /&gt;limit the number of telnet/ssh/rlogin sessions,&lt;BR /&gt;but it will only let you set the limit per IP address&lt;BR /&gt;and not per user. If a user is tied to a particular&lt;BR /&gt;IP address in your network, then IPFilter is&lt;BR /&gt;the quick and easy solution.&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Mar 2007 11:28:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/is-there-an-easy-way-to-limit-concurrent-login-sessions/m-p/2417247#M757691</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2007-03-21T11:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an easy way to limit concurrent login sessions?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/is-there-an-easy-way-to-limit-concurrent-login-sessions/m-p/2417248#M757692</link>
      <description>By far, the easist method is to edit /etc/default/security (you may need to create this file) and add an entry:&lt;BR /&gt;NUMBER_OF_LOGINS_ALLOWED=n.&lt;BR /&gt;&lt;BR /&gt;Man security for details.&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Mar 2007 11:38:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/is-there-an-easy-way-to-limit-concurrent-login-sessions/m-p/2417248#M757692</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-03-21T11:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an easy way to limit concurrent login sessions?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/is-there-an-easy-way-to-limit-concurrent-login-sessions/m-p/2417249#M757693</link>
      <description>Do a man on security, then set up a file called /etc/default/security with the NUMBER_OF_LOGINS parameter specified  per your requirements.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 21 Mar 2007 11:55:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/is-there-an-easy-way-to-limit-concurrent-login-sessions/m-p/2417249#M757693</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2007-03-21T11:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an easy way to limit concurrent login sessions?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/is-there-an-easy-way-to-limit-concurrent-login-sessions/m-p/2417250#M757694</link>
      <description>I am not sure of any inbuilt way of HP-UX to prevent a user from logging in more than one session concurrently. What i will do is, add the below lines into /etc/profile to check if the user is already logged in and if thats the case, don't let them log in again. Like...&lt;BR /&gt;&lt;BR /&gt;LOGIN_SESS=`who | grep $LOGNAME | wc -l` &lt;BR /&gt; if ( $LOGIN_SESS &amp;gt;= 1 )&lt;BR /&gt;  then&lt;BR /&gt;    echo "You are already logged on this system."&lt;BR /&gt;    echo "No more sessions allowed."&lt;BR /&gt;  exit&lt;BR /&gt; fi&lt;BR /&gt;&lt;BR /&gt;User can always modify it though.</description>
      <pubDate>Wed, 21 Mar 2007 23:48:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/is-there-an-easy-way-to-limit-concurrent-login-sessions/m-p/2417250#M757694</guid>
      <dc:creator>Anshumali</dc:creator>
      <dc:date>2007-03-21T23:48:30Z</dc:date>
    </item>
  </channel>
</rss>

