Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

SookieSam

macrumors newbie
Original poster
Aug 24, 2011
7
0
Victoria, British Columbia
Hello MacOSX users,

I'm in a situation where I would like to be able to initiate an unconditional logout when a particular (evil) user attempts to log into one of my iMac computers.

I have both a login and logout script defined on my iMacs, so what I would like to do is add some code to the login tcsh shell script to perform this function.

I can determine the UserID of the "evil" person(s) attempting to login no
problem.

Question is, what do I do next? How do I tell MacOSX to abort the login process and return to the login screen?

Has anyone here ever tried doing anything like this before?

I've been playing around with the killing of UNIX processes but not sure which one I should be killing?

Also tried creating an AppleScript application that does an unconditional logout by emulating the pressing of the key combination "command:shift:eek:ption:Q" but I can't get it to work during login process.

(my created app works fine if run manually once login process has completed)

Fishing for ideas here ... any takers?

SookieSam
 
Why? Just delete the account.

EDIT: Removed the solution as I think you're just trying to piss someone, who has a legitimate reason to use the computer, off.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.