Authenticating to make changes to finder

How can I script authentication to make changes to the Finder?
My script is as follows:
tell application "Finder"
copy file "Photo [OSX]:Library:Receipts:iTunes4.pkg:" to desktop
copy file "Photo [OSX]:Library:Receipts:iTunes.pkg:" to desktop
move file "Photo [OSX]:Library:Receipts:iTunes4.pkg:" to trash
end tell
The move file command asks for an authentication before it will move the file. How can I script the admin name and password so the script can proceed.
pedro

Since you're manipulating a system directory the Finder will ask you to authenticate and there's no way to fully automate the authentication in the Finder.
Copying the files in the Finder should be OK, it's the deletion that's causing you problems. One alternative solution would be to use a shell script instead:
set ReceiptsDir to (path to library folder as text) & "Receipts:"
set file2Delete to ReceiptsDir & "iTunes4.pkg" as text
do shell script "rm -r " & (quoted form of POSIX path of file2Delete) password "itsasecret" with administrator privileges
Note that this script uses 'rm' to delete the file. If you wanted a closer match to your original script you could 'mv' the item to ~/.Trash instead.

Similar Messages

  • When trying to delete files, I get the following message, 'Finder Wants to make changes. Type your password to allow this.'

    I'm running Mac OS X Version 10.7.4 on my iMac and am suddenly unable to simply move files to the trash.
    Instead, I get the following message: 'Finder wants to make changes. Type your password to allow this.'
    When I do enter my password, the file does not enter the Trash but seems to disappear.
    I tried to find ways to revert to previous settings that allowed me to move files to the trash, but had trouble doing so.
    How can I get my iMac to run normally?
    Cheers!

  • How to find out which users are using SharePoint Designer to make changes in SharePoint 2010 site?

    Hi there,
    How to find out which users are using SharePoint Designer to make changes in SharePoint 2010 site?
    Thanks.

    You need to enable auditing on SharePoint server and it will let you know, if someone makes any critical changes for the same.
    Please walk through this informative KB to enable auditing on SharePoint :https://support.office.com/en-za/article/Configure-audit-settings-for-a-site-collection-f5a346d0-ee0f-4412-a5e6-d9b5abaa1012
    Here is one more resource :
    https://support.office.com/en-in/article/View-audit-log-reports-4293e8d5-4e7d-4201-b8ac-c8e63a100131
    Moreover, if you wish to audit such critical changes automatically, you may consider on this comprehensive application (http://www.sharepointauditing.com/) that helps to track every changes on SharePoint into
    real time and provides the captured data at granular level.

  • I loaded Mac OS X v10.7 Lion yesterday. Everything's running fine, except for a simple problem. Any time I want to copy a file, JPEG, etc., I am prompted "Finder wants to make changes. Type your password to allow this." I don't want this!! Is there a way

    I loaded Mac OS X v10.7 Lion yesterday. Everything’s running fine, except for a simple problem. Any time I want to copy a file, JPEG, etc., I am prompted “Finder wants to make changes. Type your password to allow this.” I don’t want this!! Is there a way to unlock “Finder” or rid this process?

    Back up all data.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. You can demote it back to standard status when this step has been completed.
    Triple-click the following line to select it. Copy the selected text to the Clipboard (command-C):
    sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:20 ~ $_ ; chmod -R -N ~ $_ 2> /dev/null
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you don’t have a login password, you’ll need to set one before you can run the command.
    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2
    Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    resetpassword
    That's one word, all lower case, with no spaces. Then press return. A Reset Password window will open. You’re not going to reset a password.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • Suddenly I have problems moving files to the trash...  get a dialog saying Finder wants to make changes and I must provide the password... Any explanation or ideas how I can get this to stop?

    Suddenly I have problems moving files to the trash...  get a dialog saying Finder wants to make changes and I must provide the password... Any explanation or ideas how I can get this to stop?

    Please take these steps if you're prompted for a password when moving items in your home folder to the Trash.
    1. Triple-click anywhere in the line below on this page to select it:
    ~/.Trash
    2. Right-click or control-click the highlighted line and select
    Services ▹ Show Info
    from the contextual menu.* An Info dialog should open.
    3. The dialog should show "You can read and write" in the Sharing & Permissions section. If that's not what it shows, click the padlock icon in the lower right corner of the window and enter your password when prompted. Use the plus- and minus-sign buttons to give yourself Read & Write access and "everyone" No Access. Delete any other entries in the access list.
    4. In the General section, uncheck the box marked Locked if it's checked.
    5. From the action menu (gear icon) at the bottom of the dialog, select Apply to enclosed items and confirm.
    6. Close the Info window and test.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. Open a TextEdit window and paste into it (command-V). Select the line you just pasted and continue as above.

  • Getting message when trying to clean up items on HD. Finder wants to make changes. Type password to allow."

    I recently downloaded yosemite and am trying to put items from my HD into trash.  I keep getting a message "Finder wants to make changes. Type password."

    That message will appear if you attempt to delete items from Applications, among other reasons. It is there to confirm you know what you're doing.
    If that dialog appears when you are attempting to delete items from your Home directory, something is wrong.

  • Every time I try to send to the trash anything to the trash appears de following: Finder is trying to make changes. Introduce your password to allow this action. Appears since 24h ago, never before had this problem, What´s the problem?

    Every time I try to send to the trash anything, appears de following: Finder is trying to make changes. Introduce your password to allow this action. Appears since 24h ago, never before had this problem, What´s the problem?  I am using Mac OS lion

    Can you post the permissions on your Home folder?
    Open Terminal, copy and paste this command. Copy the output and post here. If you want to mask out your user name, then paste the output into a text editor and use Find/Replace to change it to something like "username" before pasting it in here.
    ls -ale

  • I just started getting the error message below - when I drag a file to TRASH, I get the message "Finder wants to make changes. Type in your password to allow this.  Why ? and how to to stop this request ?

    I just started getting the error message below, when I drag a file to TRASH, I get the message "Finder wants to make changes. Type in your password to allow this."  Why ? and how to to stop this request ?

    There should be nothing native to the OS X which would ask for a password
    or  other information on a restart, unless accompanied by the traditional login
    box with your user name.
    There are adware or marginal products that could be called malware (bad)
    that would impose their presence and some items that could have been
    downloaded by accident or through some corrupted free software site; of
    those some could ask for and gain permission to go through your Mac
    and maybe even run in the background to do other nefarious misdeeds.
    You could see if startup in SafeBoot allows you access past that the Completer.
    Since I don't have a pile of helpful article links on how to resolve various issues
    I'd be looking them up one way or another.
    There are some helpful items in the site http://thesafemac.com - see Tech Guides
    listed  (adware, malware, & performance) plus a link to the adwaremedic page.
    Also, Apple support has a helpful page on how to remove adware and other bits:
    •Remove unwanted adware that displays pop-up ads and graphics on your Mac - Apple Support
    Hopefully this helps somewhat.
    Good luck & happy computing!

  • Desktop to Trash Problem: "Finder wants to make changes. Type your password to allow this."

    Suddenly today I get a dialog box stating "Finder wants to make changes. Type your password to allow this," whenever I attempt to drag a file from the desktop into the Trash on the dock.  How can I stop this and return to a normal function of dragging desktop files into the trash?  Thanks in advance.

    Back up all data now.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Drag or copy — do not type — the following line into the Terminal window, then press return:
    sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:20 ~ $_ ; chmod -R -N ~ $_ 2> /dev/null
    Be sure to select the whole line by triple-clicking anywhere in it. You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. You don't need to post the warning. If you don’t have a login password, you’ll need to set one before you can run the command.
    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2
    Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the OS X Utilities screen appears, select Utilities ▹ Terminal from the menu bar. A text window opens.
    In the Terminal window, type this:
    resetpassword
    That's one word with no spaces. Then press return. A Reset Password window opens. You’re not going to reset a password.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select  ▹ Restart from the menu bar.

  • Finder wants to make changes. type your password to allow this

    Hi everyone,
    OS Type : Mac OS X Lion 10.7.3
    Application : Finder ?
    Context : The Mac is connected to our Active Directory and there are some network shares also connected to the Mac.
    Issue : The following message pop-ups  randomly when the user tries to rename/create a folder/file on a mapped disk.
    Message : Finder wants to make changes. Types your password to allow this.
    I Insist this problem is completly random and to solve that, you need to restart the Mac and then the exact same folder can be renamed,etc...
    Thanks for any suggestions.

    Boot to your recovery partition or boot media (hold option while booting).
    Open 'Reset Password' utility
    Choose the affected user name from the drop down menu.
    In the bottom-right corner, click the 'Reset' button to set your ACL permissions.
    Restart.
    Now see if the issue is resolved. Should be.

  • When I attempt to drag doc to trash "Finder wants to make changes" "Type your password to allow this"  When I do this the doc is immediately deleted.  How do I turn this off?

    When I attempt to drag doc to trash "Finder wants to make changes" "Type your password to allow this"  When I do this the doc is immediately deleted.  How do I turn this off?

    Please take these steps if you're prompted for a password when moving items in your home folder to the Trash.
    1. Triple-click anywhere in the line below on this page to select it:
    ~/.Trash  
    2. Right-click or control-click the highlighted line and select
    Services ▹ Show Info
    from the contextual menu.* An Info dialog should open.
    3. The dialog should show "You can read and write" in the Sharing & Permissions section. If that's not what it shows, click the padlock icon in the lower right corner of the window and enter your password when prompted. Use the plus- and minus-sign buttons to give yourself Read & Write access and "everyone" No Access. Delete any other entries in the access list.
    4. In the General section, uncheck the box marked Locked if it's checked.
    5. From the action menu (gear icon) at the bottom of the dialog, select Apply to enclosed items and confirm.
    6. Close the Info window and test.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard (command-C). Open a TextEdit window and paste into it (command-V). Select the line you just pasted and continue as above.

  • When I right-click on a file "Move to Trans", I get the following message: "Finder wants to make changes.   Type your password to allow this."  It then deletes bypassing the trash can.

    When I right-click on a file to "Move to Trash", I get the following message:
    "Finder wants to make changes.  Type your password to allow this."
    It then deletes the file bypassing the Trash basket.

    Maybe this will help:
    https://discussions.apple.com/message/20499360#20499360
    Monitor the "More Like This" box for other solutions.

  • "Type your password to allow Finder to make changes."

    "Type your password to allow Finder to make changes."
    Why am I being prompted to do this 100% more often than I was in 10.5.x? It's been happening a lot when I move files from one folder into another.

    dechamp wrote:
    I see this happen on occasion when moving files from a network drive or other computer. The files and folders don't have the proper permissions as I'm not the owner of the files. I usually put all the transferred files into a folder, get info and change the permissions to Read/Write and click on the gear icon to change the permissions to the same settings for all of the enclosed files and folders. This requires me to type the password once for all those files.
    Where are the files coming from that you are trying to move?
    You are awesome! That is exactly what I was doing. I had copied a folder from a network drive to install some files. Then I tried to delete the folder after the install. I was prompted with the message in this thread. I checked permissions and I did not have read/write privileges even though I was logged in as the admin both when copying and deleting. Thanks!

  • When I try to drag an item into the trash, I get message that Finder wants to make changes; enter password

    When I try to drag anything into the trash the message :  Finder wants to make changes;  enter your password.  But I cannot trash the document/folder, etc.  I can eject a disk/flash drive etc by dragging to the trash.

    Choose your Home folder "Get Info" (command-i) and be sure you have "read & write" in the Sharing & Permissions section. Check under "General" section to be sure it isn't locked. If that is correct, launch Applications/Utilities/Terminal and at the prompt copy & paste this command…
    mkdir ~/.Trash
    Press return.
    If you get a message that the folder already exists, copy & paste these commands...
    sudo chown $UID ~/ .Trash
    Press return.
    Enter your admin password (it will be invisible)
    Press return.Then enter
    chmod u+rwx ~/.Trash
    Press return. Log out and back in, or restart.

  • Since the last software update for mountain lion I am having a problem when moving screenshots to trash. Now a Finder box appears saying finder wants to make changes and I have to enter my password for every action.

    Since the last software update for mountain lion, I am having a problem when trying to remove any screenshots to the trash. A box appears saying "Finder wants to make changes. Type your password to allow this"
    I have checked Finder Preferences and cannot find any box that I can 'UNTICK' to resolve this. I sometimes take a lot of screenshots when I am researching something and now find I have to enter my password for every screenshot to be removed to trash.
    Anyone got a solution please, Thanks

    Have you looked at the previous discussions listed on the right side of this page under the heading "More Like This"?

Maybe you are looking for

  • Adobe After Effects CC 2014 warning plug-ins failed..

    Hello, This is a fresh update version with no previous 3rd party plug-ins. Asking if it is  better to delete and re-install program or other method to correct problem. Thanks for the help Kelly

  • Compatibility re MacBook Pro (early 09) and Lexmark 7100 Series All in One?

    Just purchased a new MacBook Pro with OS 10.5.6. Having difficulty getting my Lexmark 7100 All in One Printer/etc. to work with it. Computer does not recognize Lexmark 7100 printer/etc. and I keep getting messages saying that Lexmark works with OS 10

  • JUMP TO branching has stopped working in a CP4 project!

    I created a training program where the 3rd slide has two click boxes. Click box 1 calls a jump to slide 4 which is the next slide and Click box 2 calls a jump to slide 5. This has worked perfectly for a long time now during development but just recen

  • Error when compiling invalid object   XLA_00555_AAD_C_011117_PKG

    Hello folks, i am getting error when compiling the following object. XLA_00555_AAD_C_011117_PKG here i have mentioned below is what i have done for that invalid object. SQL> select owner,object_name,object_type 2 from dba_objects 3 where status='INVA

  • Lost frustrated and confu

    I hope that someone can help me. I received a Zen Stone for my anni'versary from my husband 3 weeks ago. However, I have yet to be able to put music on it. I downloaded the creative media light software and every time I try to transfer a song from my