Operating System - HP-UX
1832721 Members
2807 Online
110043 Solutions
New Discussion

User can't access the system

 
peterchu
Super Advisor

User can't access the system

In my HP server , there are about 200 users will login to the system , they are accessing to database , everyting seems normal . However , there is a problem , soemtimes when the user'desktop hang up or exit the database adnormally , then the user can't login again (because we only allow each user can login no more than 1 session ) , the users have to wait until the system release the login ( about 1 hour ) , could suggest how do I fix this problem ? how can the user kill ( terminate ) the previous dead login session ? thx in advance.
6 REPLIES 6
steven Burgess_2
Honored Contributor

Re: User can't access the system

Hi

When you say the user cannot login again. Do you mean via the shell ? When the user is kicked out and you do a last -R are they showing as still logged in ?

Steve
take your time and think things through
Rashid Hamid
Regular Advisor

Re: User can't access the system


You can kill the users immediately,
#who -u |greep to identify the user process id and
#kill -9
(normally i use kill -9)

Rashid
I'm Parit Madirono/Parit Betak Boyz
Dexter Filmore
Honored Contributor

Re: User can't access the system

See if there is a runaway process for that user running in the background. If so, you can probably kill it (best done by an administrator rather than an end user).
peterchu
Super Advisor

Re: User can't access the system

thx replies, the system administrator surely can kill the process , but I want the user have the ability to kill their dead login process by themself , could suggest how can I make it ? thx
steven Burgess_2
Honored Contributor

Re: User can't access the system

Hi

Are there any other processes associated with a valid login that die when a session is lost ? If you are certain the session has been killed but the login is still kicking around (owned by init with a ppid of 1 maybe) you could have a cron job that will kill off the user session.

ie

for x in `ps -ef | grep "" | awk '{
if ( $3 == 1 ) {
printf "%s\n", $2
}
}'`
do
kill -9 $x 2>/dev/null
done

HTH

Steve
take your time and think things through
Dexter Filmore
Honored Contributor

Re: User can't access the system

This is not something you should allow an end user to do. If the wrong process is killed, it can have serious effects on the server.

You can either have an administrator kill the process manually or implement a script, like the one in Steven's post, that will check for runaway processes on a regular basis and remove them.