Having a strange problem here… I made a script to telnet into my server… this one works fine. I’m telnetting from OSX to Unix.
tell application "Terminal"
do script "telnet 192.168.1.1 9000"
delay 1
do script "username" in window 1
delay 1
do script "password" in window 1
delay 1
do script "su" in window 1
delay 1
do script "password" in window 1
end tell
I need to make a script to start postfix when the machine starts up, but when I try to execute this script with the ‘quit’ command included, Terminal prompts to terminate the session. With the ‘quit’ command omitted, the terminal hangs at the password prompt.
tell application "Terminal"
launch
delay 1
do script "sudo postfix start" in window 1
delay 1
do script "password" in window 1
quit
end tell
Is this a security “feature” of OSX? If so, is there another way to enter text and a carriage return into the command line besides “do script”?
Other commonly known ways of getting postfix to start up automatically in 10.4 are not working, hence my attempt to do it this way.
Thanks in advance!
Guri
Browser: Firefox 1.5.0.2
Operating System: Mac OS X (10.4)
I’m using Terminal because nothing else was working to get postfix to start when the computer boots.
Kel, this board is littered with your 1400+ comments - the majority of which are of you telling people to “experiment” and “read the manual”. Unless you have something constructive to contribute to the conversation, STFU.
Admittedly, Kel was in a bad mood today and was not “nice” to two posters that I noted, but to say that
is hardly a fair representation of his contributions. I will say that he and others resent folks who expect other contributors to simply write a script for them, but that was not the case here.
Now to the technical issue: Assuming you’re running Tiger, this should work for you:
do shell script "postfix start" user name "yoursHere" password "yourPW" with administrator privileges
Save it as a run-only app so folks can’t easily see your PW, and set it to run at startup.
Sorry you were “pissed”.
ADDON: in 10.3.x, that should be (I think - don’t have it):
do shell script "sudo postfix start" user name "yoursHere" password "yourPW"
Yeah… I worked almost the entire day trying to get various things to work to solve my problem. Having failed at everything I tried, I posted a question here. I don’t expect others to do things for me - I’m not lazy. What is totally uncool is for someone like kel to treat me like some punk and spam the boards with insults. I looked at some other posts of his and noticed I’m not alone.