1

I am the admin on a shared MacOS X: Big_server running Yosemite. The version of MacOS isn't a key information: I had the same kind of problem on all versions of MacOS.

But today I have a practical big case and time to analyze and test solutions. Big_server is hosting professionnal services (firewall and mail server) and can't be rebooted to play.

I have another user bob who left his session open. He forgot to close it and is on vacation for many weeks. Hence the console is locked waiting for his password. I know how to kill bob's session like a pig.

However, I noticed that this colleague has more than 50 processes running, some of them terminating with:

...Support/photolibraryd
.../com.apple.CloudPhotosConfiguration
...

and I would like to avoid corrupting any of his libraries or files which might have been left opened.

How may I terminate cleanly bob's session without corrupting his data?

2

Bob’s user can send a Kill signal to all their processes.

sudo su - bob
kill -9 -1

This leaves all non Bob processes running and sends the non maskable SIGKILL to all processes by that UID. On newer os, some processes will respawn as uses Bob, but you’ll have cleaned them up momentarily and the old session will be gone.

  • Nice old school method 😉. Why not a kill -1 -1? – dan Aug 14 '19 at 19:54
  • You could kill the user loginwindow process as well. No reason to. To use another signal, -9 just feels “bad” to me so I chose it. “kill kill” works for me @dan – bmike Aug 14 '19 at 20:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .