multiple login

I have a RedHat 5.2 box as dial-in server for 50 PPP and POP accounts.
How can I prevent multiple logins on same account??

Who is Participating?
tim_lbiConnect With a Mentor Commented:
read /etc/security/limits.conf.. Use something
@ppp_users soft maxlogins 1
Where ppp_users is a group, and all ppp users are members.

replace the shell in /etc/passwd by a program which checks for multiple logins, like:

if test `w | grep ^$user|wc -l` -gt 1; then
   exit 1
   exec /bin/bash -login

(don't forget to disable chsh).
Wow.  Awesome answer.
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

mcdonc, what do you find so awesome? Did you know a better one, post it ;-)
ahoffman, i wasn't being sarcastic... i love it when people can just rattle off useful shell scripts out of their head.  its more than i can do.   i love little scripts that solve big problems.  hats off to you.

mcdonc, probably my dictinoary is wrong about "awesome"; I read it as is, not sarcastic. I would not have asked if you would had marked it with an emoticon ;-)
Anyway, keep on joking ..

scandic, and everybody

I am sorry to post this comment but I have to...

This is about scandic not bothering to grade her questions (once she gets her answers)

Months ago,  it was "Dial-in for 6 lines" a question about how-to setup a dial-in ppp server
with a Cyclades serial board. I answered most of her questions with a comment, and
have not heard from her since (the question is now missing, probably deleted, without
an additional comment)

After that, there came the "Cyclades Problem" question:
(She got the idea, but could not get her board working)
'canani' answered the question with a comment. You can still find it among
Linux Networking questions, waiting for a comment from scandic.

Finally this...
It is obvoius that scandic finally got her setup working and is tuning-up some minor problems. No comment from her since 15 Jan. Same pattern emerging again...

three questions asked, all answered,
she got her setup working
no points paid. no comments no acknowledgements!

I dont care much about points but when I make a posting, I would like to receive a
feedback, negative or positive. Did it work or not. Points or grading is one way of doing
this. But even if you do not wish to give points, writing a comment would be the polite thing to do.

I dont know if experts-exchange has a policy about such behaviour. Perhaps
I should have written to them. But I still would like an explanation from scandic
(Am I dreaming too much?)


canacar, have a look at  :-)
then you probably drop a message at
scandicAuthor Commented:
Hi tim_lbi, hi all

First of all I want to excuse me for my inactivity, but I was in hospital for a surgical intervention on my leg.

Dear tim_lbi, your idea it seems to be very simple but it doesn’t work for me. Do you know why? Do you think I need another settings?

Thanks for your understanding

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.

All Courses

From novice to tech pro — start learning today.