1846869 Members
2985 Online
110256 Solutions
New Discussion

unix script

 
Mario Edgardo
Occasional Contributor

unix script

We have restrictions to allow one session for some users, two sessions for others, and tree sessions for some others users, but we need a script to kill the old session, when a user that only have permissions to have only one session open a second one, because if not the old session gets locked in the system

may i have that script

in this moment we have a script to make restrictions of connection and this

3 REPLIES 3
John Carr_2
Honored Contributor

Re: unix script

do not do this restrict the number of logins a user can have. If you kill the sessions off you could loose there work or corrupt files ...

check out todays questions we have already covered this

:-) John.
Mark Grant
Honored Contributor

Re: unix script

Mario,

as has been suggested in your other thread, why not just stop them being able to log in the second time.

If there is a specific application that you need to kill and that isn't dying when they log out the first time, just grep for their name and the process name and kill it. You can put it in their .profile if you like so that it kills that one application off while they are logging in.
Never preceed any demonstration with anything more predictive than "watch this"
Michael Schulte zur Sur
Honored Contributor

Re: unix script

Hi Mario,

why are these processes hanging in the first place? Do you have a trap 1 in the users .profile?

greetings,

Michael