Limit users to logging in from one concurrent host

I realy want to do this as a means to discourage the sharing of accounts (a rampant problem at my company).

Users need to be able to use thier account from any host, and need to be logged in from the same host multiple times, but I dont want them using the same account from a second host concurrently.

Any suggestions on how to implement this under suse 9.1?
LVL 4
squatexAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

garak1357Commented:
More information is really needed.  What type of logon are you talking about?  SSH?  Telnet?  Samba Domain?  It would also be helpful to know what is the general landscape of your network.  Are they all Suse Linux systems?  Do you have any Windows or UNIX systems?

This is an interesting question.  I'm not sure I can help but I'd like to know more to give it some thought.
0
squatexAuthor Commented:
These are all windows  clients and a single Suse 9.1 server. The telnet and ssh sessions are all I really care about in this context. They all connect (we max out at about 130 users) via telnet/shh to run a custom finance app.

Fact is, I really dont have alot of control at the network level so making changes there is kind of moot. I do have complete control of this box though.

I was hoping there was some kind of built in functionality in PAM that would allow me to do this, otherwise Ive got a nasty shell script to write.

0
yuzhCommented:
I think it is easier to write a wrapper script for your app, maintain a counter in your system, check the number of instance of the app is running before start a new one.

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

squatexAuthor Commented:
yuzh - This will not work because users may or may not be running multiple instances of the app. Im looking to do this at the telent/ssh level anyway.
0
yuzhCommented:
To limit telnet or ssh session, you can modify /etc/profile, please see
my answer in:
      http:Q_21193950.html
0
squatexAuthor Commented:
Yea but that doesnt fit the criteria.

Nevermind I figured it out anyway. Thank you  for trying to help me out.

Just in case anyone needs it add it to you ~/.profile.:

hostlist=`last  | grep $USER[[:space:]] | grep "still logged in" | cut -c 23-39`
telnetmyhost=`echo $REMOTEHOST | cut -c 1-16`
sshmyhost=`echo $SSH_CONNECTION | awk '{print $1}' | cut -d: -f4`
if [ $telnetmyhost = "" ]
then
myhost=$sshmyhost
else
myhost=$telnetmyhost
fi
for ahost in $hostlist
do
if [ $ahost != $myhost ]
then
kill -9 $$
fi
done
0
yuzhCommented:
Agree with PAQ / Refund

  Cheers!

yuzh

     PS: to check user current login to the system "who" is better than "last", "who" still can give you
           the remote login infor.
0
moduloCommented:
Closed, 300 points refunded.

modulo
Community Support Moderator
Experts Exchange
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.