In other words:
- Log on as Bert (who is an administrator)
- Using fast user switching, log on as Ernie (Bert remains logged on)
- Switch back to Bert
- Bert logs Ernie off
What is the best way to achieve step 4?
In other words:
What is the best way to achieve step 4?
sudo launchctl bootout user/$(id -u <username>)
Replace <username>
with the target user's user name.