Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 365
  • Last Modified:

Limit number of concurrent Connections/Logon

I want to limit the number of telnet sessions that a users can have at one time, and set it to 3 or 4. Is there a command that will do this in AIX 3.2
0
santama
Asked:
santama
1 Solution
 
fredfanCommented:
Basically you can't do that unless your users are telneting thru another device. Fo example in HP you have something called DTC whereby from the DTC Openview management tool you can set how many session a user can telnet or to which server.

Anyway I suggest you try controlling them thru the user's .profile / .login file.
Below is an example of UNIX script where you can append to the user profile before they can do anything.

## limit user login to 3 times max only
##
USER=`whoami`
cnt=`who -H | grep -c "^${USER} "`
if [ $? -ne 1 -o ${cnt} -gt 3 ];then
        # Same User exists
        echo "\n\07Sorry, user ${USER} already login more than 3 times!"
        sleep 5
        exit
fi
0
 
santamaAuthor Commented:
That is good enough for what I want.

Thanks.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now