3 Replies Latest reply: Apr 20, 2007 1:04 PM by Zerwas
sbono Level 1 Level 1 (0 points)
I need to find instructions on how to create a script to automatically run the following Terminal command;
Sudo chmod 755 /private/var/spool/cups. It will also need to include the admin password as you will be prompted to enter it after the command line is entered. Apparently the only way to get Quark 7 to print adobe pdf's is to open a terminal window and type the command every time the machine is rebooted. This is a temporary fix and I do not want the MAC users to have to type the command.

Thanks

Sal

Power MAC G5, Mac OS X (10.4.9)
  • Zerwas Level 4 Level 4 (1,140 points)
    You can use an AppleScript for this.

    Open the ScriptEditor and copy the lines into:
    do shell script "chmod 755 /private/var/spool/cups" password "YourPassword" with administrator privileges

    Then save the Script as Programm and put it in the Startup Items in your account.

    At every Login, the script should be executed. When you want an password box, remove the lines for the password.
  • sbono Level 1 Level 1 (0 points)
    Did not work. I kept getting an invald script error so I changed the line to read. do shell script "sudo chmod 755 "private/var/spool/cups" password "***". I saved the file as an APP. I keep getting prompted for the password and if I type it in the propmt dissapears and does not seem to have changed the permissions on the cups folder.

    Sal
  • Zerwas Level 4 Level 4 (1,140 points)
    This Script works here. Get you the error, when you save or checks the syntax?

    When you use in AppleScript the entry with administrator privileges, is sudo optional. This says only, if everyone can use the sudo command inside of the 5 minutes limit without to write the password again or not.

    The Syntax do shell script "sudo chmod 755 "private/var/spool/cups" password "***" doesn´t work, because you need the entry with administrator privileges for the execution as privileged user.