Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Login hook removal??

So I tried hooking my Macbook up to our corporate network. I used an installer they had that must have changed some settings, because now I have to always log in to my computer when it boots. I changed this in the security panel, but it still won't bypass it. I also notice, it now runs Login Hooks when I boot up and shutdown. It never did before. Wonder if that's what is screwing it up. How can I remove those and get this back to normal without reformatting everything and starting from scratch!

Thanks

Message was edited by: tetuanrp

G5 - Power PC, Mac OS X (10.4.3)

Posted on May 16, 2008 5:01 PM

Reply
Question marked as Best reply

Posted on May 16, 2008 5:52 PM

See this article about Creating a login hook. Basically, if that's what's set up, you'll need to reverse the steps.

Open Terminal (/Applications/Utilities) and type:

sudo defaults read com.apple.loginwindow

You will be asked for your password. Nothing will appear as you type it. You may receive a short lecture if you've never used sudo before.

You need to make a note of the paths for the LoginHook and the LogoutHook.

Now type:

sudo defaults delete com.apple.loginwindow LoginHook

sudo defaults delete com.apple.loginwindow LogoutHook

sudo -k

If that doesn't reveal the login hook, you need to edit the ttys file as explained in the instructions given by Apple instead but you will want to reverse the edit, of course.

That is, find this line:

#console "/System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow -LoginHook /path/to/script" vt100 on secure window=/System/Library/CoreServices/WindowServer onoption="/usr/libexec/getty std.9600"

and edit it to look like this:

#console "/System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow" vt100 on secure window=/System/Library/CoreServices/WindowServer onoption="/usr/libexec/getty std.9600"

(See the link for details.)

Again, make a note of the path to the login hook script.

Finally, find the scripts at the paths you noted and delete them if you wish. You could skip this step if you wanted to - they won't be run now you've made these changes.

- cfr
2 replies
Question marked as Best reply

May 16, 2008 5:52 PM in response to tetuanrp

See this article about Creating a login hook. Basically, if that's what's set up, you'll need to reverse the steps.

Open Terminal (/Applications/Utilities) and type:

sudo defaults read com.apple.loginwindow

You will be asked for your password. Nothing will appear as you type it. You may receive a short lecture if you've never used sudo before.

You need to make a note of the paths for the LoginHook and the LogoutHook.

Now type:

sudo defaults delete com.apple.loginwindow LoginHook

sudo defaults delete com.apple.loginwindow LogoutHook

sudo -k

If that doesn't reveal the login hook, you need to edit the ttys file as explained in the instructions given by Apple instead but you will want to reverse the edit, of course.

That is, find this line:

#console "/System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow -LoginHook /path/to/script" vt100 on secure window=/System/Library/CoreServices/WindowServer onoption="/usr/libexec/getty std.9600"

and edit it to look like this:

#console "/System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow" vt100 on secure window=/System/Library/CoreServices/WindowServer onoption="/usr/libexec/getty std.9600"

(See the link for details.)

Again, make a note of the path to the login hook script.

Finally, find the scripts at the paths you noted and delete them if you wish. You could skip this step if you wanted to - they won't be run now you've made these changes.

- cfr

Login hook removal??

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.