Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Prevent Terminal from opening without approval' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Prevent Terminal from opening without approval
Authored by: gbws on Feb 28, '06 09:55:55AM

Terminal is the only application that gives you access to shell commands.

Anyway, here's my solution :
Edit .bash_profile and add :

if [ -n "$PS1" ]; then
su $USER ; exit
fi

It will prompt for your password.



[ Reply to This | # ]
Terminal.app is not the only way to execute shell commands
Authored by: moritzh on Feb 28, '06 04:44:35PM
What about executing an AppleScript with do shell script ... in it? I am not sure which shell is used, I suspect /bin/sh.

[ Reply to This | # ]