arefone
asked on
UNIX
Hi,
I need to know if there is any unix command to disconnect the user connection from terminal!???
I need to know if there is any unix command to disconnect the user connection from terminal!???
Hi,
what do you mean with 'disconnect'?
If you want to leave your processes running when terminating the shell,
you can use 'nohup' to protect them from 'hangup', '&' to put them in background and redirection to capture output, e.g.
nohup [my_long_running_job] >[logfile] 2>&1 &
Should there be an already running foreground job, put it in the background by pressing <CTL-Z> and then issuing 'bg'.
Prevent it from being terminated when you leave the shell by issuing
disown [job]
[job] is found by issuing 'jobs'
wmp
what do you mean with 'disconnect'?
If you want to leave your processes running when terminating the shell,
you can use 'nohup' to protect them from 'hangup', '&' to put them in background and redirection to capture output, e.g.
nohup [my_long_running_job] >[logfile] 2>&1 &
Should there be an already running foreground job, put it in the background by pressing <CTL-Z> and then issuing 'bg'.
Prevent it from being terminated when you leave the shell by issuing
disown [job]
[job] is found by issuing 'jobs'
wmp
... sorry, I just saw it's AIX.
There is no 'disown' in AIX, use
nohup -p [pid]
instead.
There is no 'disown' in AIX, use
nohup -p [pid]
instead.
ASKER
I mean, when the users are connected via appletalk, some times they connect with the same username from more computers, so, when I loggin via terminal I do the "w" command to see how many users are connected and from which computers, at this moment when I decide to disconnect, to end the session of one of them and to make him/her to connect again I don't know how to do, and every time I have to go to their computers and diconnect the connection by hand!
But, I remember that I used to use one command, I don't really remember it, it was somthing lik fuser -k KA3.0 or something else!!!!
Any help?
But, I remember that I used to use one command, I don't really remember it, it was somthing lik fuser -k KA3.0 or something else!!!!
Any help?
Hi,
fuser -k kills all processes using a specific resource, such as a file or a tty.
Now I'm not familiar with appletalk.
If we knew whch resource to 'kill', this would do the trick.
Could you please post, as first steps,
1) the output of ps -ef | grep [userid], where [userid] is one of your appletalk users,
2) the output of procfiles -nF [pid], where [pid] is the process id from 1) (the second column)
I guess we'll have to terminate (with fuser -k) processes using some tty, or the like.
wmp
fuser -k kills all processes using a specific resource, such as a file or a tty.
Now I'm not familiar with appletalk.
If we knew whch resource to 'kill', this would do the trick.
Could you please post, as first steps,
1) the output of ps -ef | grep [userid], where [userid] is one of your appletalk users,
2) the output of procfiles -nF [pid], where [pid] is the process id from 1) (the second column)
I guess we'll have to terminate (with fuser -k) processes using some tty, or the like.
wmp
ASKER
I agree, we have to terminate using some tty, so how I have to do the command for kill the user bellow?
francesc + KA13.0 Feb 17 10:12 0:55 2928 (192.168.100.89)
francesc + KA13.0 Feb 17 10:12 0:55 2928 (192.168.100.89)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It worked!
Thanx
Thanx
ps - U bill
kill -9 {all processes listed by the previous command - enter one by one and enter)
You could use the kill command to kill all processes for a user:
kill -9 `ps -u bill | grep -v PID | awk '{ printf ("%s ", $1); }'`
This works in Linux and is much simpler, but I can't verify that it works in Unix:
# skill -CONT -u bill
TK