On Thursday 10 November 2005 10:41, shlomo solomon wrote: > Is is possible to limit the number of simultaneous sessions on a per-user > basis? I was asked this question at work (about UNIX, but I assume the > answer would be similar). I GOOGLEd and didn't find anything, but > logically, I would think it shouldn't be too big a problem to add a script > to the login process to check if the user is already logged in (using ps, > for example) and if the limit has been reached, not allow the user to > login.
I would suggest you look up the documentation for pam_limits. It might be interesting. > What would happen in a GUI environment where (for example in KDE) if > you're already logged in, you can open several command prompts without > being explicitly asked to login again (although I assume that a login is > performed, even if a password is not specifically requested). Actually, not - its not unlike starting MC from your login and then running bash from it - you don't actually perform another login. > Would it make > a difference if the additional session being requested was on a different > physical terminal? TIA AFAIK, it won't make a difference to pam_limits, as it does not take into account the origin of the login (local or remote), but I don't see any problem in writing your own pam module which does support this distinction (although pam_access might help with that). -- Oded ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
