How to create a script to unmount a disk not permanently without typing the admin password?

Hello everybody!
My problem is the following: I have  a macbook Pro with a Bootcamp partition, which is also virtualized by Virtualbox. I managed to make it work following different online guides that share all the main little side issue: if I don't want to dismount forever your Bootcamp disk from the running OS X, I have to use some "sudo" commands that requires me to type my admin password. In order to do so, I have to open the Terminal, type the string, type the password and then, only then, I can use the virtualized version. Well, since these ones are computer machines, born to work on repetitive and tedious processes, I'd like to automate that.
I have a little script, which doesn't work, that I'm showing you (Let's say I wrote it to make it clear to you what I would like the machine to do):
do shell script "sudo chmod 777 /dev/disk0s4"
tell application "Finder"
    if exists "BOOTCAMP" then
  --Eject BOOTCAMP Volume if Mounted
          do shell script "sudo umount -f /Volumes/BOOTCAMP"
    end if
end tell
--Launch Virtual Machine
do shell script "vboxmanage startvm BtCmp-Win7"
What I'm now asking you is the following:
(a) is there a way to make it work without using my admin passaword? (... I really think the answer is no... )
(b) if the answer to (a) is no: is there a way to make a little window pop up to ask me to write the admin password and make everything work?
(c) I would like the disk to be remounted automatically once I Quit the VirtualBox application, how could I do that?
Well, I hope some kind hearted one can help me

Hello everybody!
My problem is the following: I have  a macbook Pro with a Bootcamp partition, which is also virtualized by Virtualbox. I managed to make it work following different online guides that share all the main little side issue: if I don't want to dismount forever your Bootcamp disk from the running OS X, I have to use some "sudo" commands that requires me to type my admin password. In order to do so, I have to open the Terminal, type the string, type the password and then, only then, I can use the virtualized version. Well, since these ones are computer machines, born to work on repetitive and tedious processes, I'd like to automate that.
I have a little script, which doesn't work, that I'm showing you (Let's say I wrote it to make it clear to you what I would like the machine to do):
do shell script "sudo chmod 777 /dev/disk0s4"
tell application "Finder"
    if exists "BOOTCAMP" then
  --Eject BOOTCAMP Volume if Mounted
          do shell script "sudo umount -f /Volumes/BOOTCAMP"
    end if
end tell
--Launch Virtual Machine
do shell script "vboxmanage startvm BtCmp-Win7"
What I'm now asking you is the following:
(a) is there a way to make it work without using my admin passaword? (... I really think the answer is no... )
(b) if the answer to (a) is no: is there a way to make a little window pop up to ask me to write the admin password and make everything work?
(c) I would like the disk to be remounted automatically once I Quit the VirtualBox application, how could I do that?
Well, I hope some kind hearted one can help me

Similar Messages

  • How to create Mavericks usb install disk without knowing the admin password

    How can I create a Mavericks usb for a fresh install without knowing the admin password. (lost password)

    Tearjerker wrote:
    You dont need to have the installer on a USB stick!
    I would agree with you if there was always an Internet connection available and the the Apple Servers were always in operation.  In those instances when this is not the case, a USB installation drive is good to have.  I speak from experience. 
    Ciao.

  • HT5622 How come it says I cannot use my ID?  I've typed the correct password and I still have credits.

    I'm trying to download from the iTunes store and it says I cannot use my ID.  Any ideas?

    You did not follow the proper procedure when selling the phone before resetting it to factory settings. You must help the new owner deactivate the Activation Lock or else he will have the same issue over and over when he upgrades the software or sells it to someone else.
    What to do before selling or giving away your iPhone, iPad, or iPod touch

  • How do i reset my laptops permission without resetting my admin password?

         Listen, I have a school laptop and ofcoarse they have put their own tweaked operating system on their that blocks me from accessing different parts of my laptop and opening any third party apps. As any mac person like myself I have worked my way around the permissions by using a 'ksadmin' file in a particular MacOS folder. You would think now that I have worked this out why would I need to reset my permissions. Well it's because I cannot drag anything into the applications folder and there are some games and files that the 'ksadmin' will not run. The purpose of the 'ksadmin' file is to trick the containing folder that I am actually an administartior of this laptop. So could someone please tell me how to reset my permissions without resetting the admin password. If i reset the admin pasword (I have before) they will find out!
    Thanks
    Daniel

    Then, I'd give it back to them and insist on one with the factory-provided OS. Barring that, put a bootable backup/clone onto an ext HD, boot into recovery mode, wipe the drive, and restore the OS. That will be Apple's nonbutchered OS. Then, on first boot use the Setup Assistant to migrate from the backup/clone.

  • How to create installation scripts in packaged application

    can u tel me How to create installation scripts for packaged application.
    also tell me , i have to first install scripts and then supporting objects or
    supporting objects first then installation scripts..

    Hi,
    Depending upon your usecase there are different ways to implement this logic.
    Check this for example (Read my answer in this post):
    https://forums.sdn.sap.com/thread.jspa?threadID=349151
    Also check these senarios:
    http://help.sap.com/saphelp_nw70/helpdata/en/42/9ddf20bb211d72e10000000a1553f6/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/42/9ddcc9bb211d72e10000000a1553f6/frameset.htm
    Also the delegation may be interesting for you:
    http://help.sap.com/saphelp_nw70/helpdata/en/a0/44b742cafec96ae10000000a155106/frameset.htm
    Greetings,
    Praveen Gudapati

  • How to create sap scripts?  script is a language  how to create script ?

    how to create sap scripts?
    script is a language  how to create script ?

    hi ,
    step by step procedure.
    SAP Scripts
    http://www.sap-img.com/sapscripts.htm
    http://sappoint.com/abap/
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://help.sap.com/saphelp_crm40/helpdata/en/16/c832857cc111d686e0000086568e5f/content.htm
    http://www.sap-basis-abap.com/sapabap01.htm
    http://www.sap-img.com/sapscripts.htm
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci943419,00.html
    http://sap.ittoolbox.com/topics/t.asp?t=303&p=452&h2=452&h1=303
    http://www.sapgenie.com/phpBB2/viewtopic.php?t=14007&sid=09eec5147a0dbeee1b5edd21af8ebc6a
    Other Links
    http://www.virtuosollc.com/PDF/Get_Reporter.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/da/6ada3889432f48e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/66/bc7d2543c211d182b30000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/5b/d22cee43c611d182b30000e829fbfe/frameset.htm
    http://www.virtuosollc.com/PDF/Get_Reporter.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/da/6ada3889432f48e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/66/bc7d2543c211d182b30000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/5b/d22cee43c611d182b30000e829fbfe/frameset.htm
    http://www.thespot4sap.com/Articles/Code_CostCentreReport.asp
    http://www.allsaplinks.com/dialog_programming.html
    http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/frameset.htm
    http://www.allsaplinks.com/files/using_table_in_screen.pdf
    http://www.geocities.com/ZSAPcHAT
      http://www.sappoint.com/abap/ssintro.pdf
    http://www.sappoint.com/abap/sscript.pdf
    http://www.sappoint.com/abap/sscript.pdf
    http://www.sappoint.com/abap/lsetssap.pdf
    http://www.sappoint.com/abap/sscrtpex1.pdf
    http://www.sap-img.com/sapscripts.htm
    http://www.thespot4sap.com/Articles/SAPscript_Introduction.asp
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/SAPSCRIPTS_tutorial.html
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRPROG/BCSRVSCRPROG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRRDI/BCSRVSCRRDI.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCREDIT/BCSRVSCREDIT.pdf
    http://www.sappoint.com/abap/sscrtpex1.pdf
    http://www.sap-img.com/sapscripts.htm
    http://www.esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
    sri

  • How to create /home directory in a diferent disk ?

    I installed Solaris 11-11-11 on a x4640 with 4 disks:
    How to create /home directory in a diferent disk ?
    Edited by: user1502 on Apr 25, 2012 1:51 PM

    I'm confused. It looks like you already have /home configured:
    <pre># zpool status
    pool: home
    state: ONLINE
    scan: none requested
    config:
    NAME STATE READ WRITE CKSUM
    home ONLINE 0 0 0
    c4t3d0 ONLINE 0 0 0
    errors: No known data errors
    # zfs list
    NAME USED AVAIL REFER MOUNTPOINT
    home 86K 134G 32K /home
    ...</pre>
    What is the problem? Looks like you already have /home configured. Are you sure automounter is not running?
    Try this:
    <pre>zfs set mountpoint=none home
    rm -rf /home
    zfs set mountpoint=/home home</pre>

  • How can I create a Face Time account.  I have an Apple ID and password.  When I Google how to create an account all I get is what I need for the system

    I have a 13" MacPro.  How can I create a Face Time account.  I have an Apple ID and password.  When I Google how to create an account all I get is what I need for the system

    You don't need to create an account.   Your use your Apple ID to log into Facetime.
    If you haven't already you will need to download the Facetime App from the Mac App Store.
    https://itunes.apple.com/us/app/facetime/id414307850?mt=12&ls=1
    FaceTime for Mac: Troubleshooting FaceTime - Apple Support

  • How do I reset the admin password on MacBook Air

    Does anyone know how to reset the admin password on MacBook Air ?

    OS X 10.7 Lion, 10.8 MountainLion & 10.9 Mavericks
    Reset Password starting from Recovery HD
    Start the computer,then press and hold down command and R keys to start into recovery partition.
    When you see the Apple logo, release the keys.
    Wait until  OS X Utilities window shows up.
    Move the mouse to the menubar at the top and click "Utilities", then select "Terminal"
    from the drop down.
    Terminal window will appear.
    Type in   resetpassword   and press enter on the keyboard.
    Leave the Terminal window open.
    Reset Password Utility window will open with Macintosh HD selected.
    Select the user account from the popup menu box.
    Enter a new password.
    Reenter the new password for the user.
    Enter a hint.
    Click the "Save" button.
    Click  in the menubar and select Restart.
    Log in.
    If Keychain dialog box appears, select “Create New Keychain”.

  • My wife and I share a computer for our itunes accounts. How can we copy our music libraries to each others accounts without erasing the original library? We want to merge our songs.

    My wife and I share a computer for our itunes accounts. How can we copy our music libraries to each others accounts without erasing the original library? We want to merge our songs.

    If the music is on the same computer, import the songs to your iTunes library by dragging them into iTunes or choosing File > Add to Library (Mac) or File > Add File to Library or Add Folder to Library (Windows).  If the music is on different computers you can set up Home Sharing to copy the music from one library to the other (see http://support.apple.com/kb/HT3819 and http://support.apple.com/kb/HT4620).

  • How can I sync my iphone songs to a new library without losing the songs on my iphone. I no longer have access to the old library as it was on a company computer that I no longer work for.

    how can I sync my iphone songs to a new library without losing the songs on my iphone. I no longer have access to the old library as it was on a company computer that I no longer work for.

    Third Party software do a google search

  • How do I upload photos from my PC to my ipad without deleting the photos already on my ipad?

    How do I upload photos from my PC to my ipad without deleting the photos already on my ipad???

    The iTUnes sync syncs the contents of a folder you choose. ANd it handles only one folder at a time.
    What I did to keep things straight, was to make a separate folder inside the 'my photos' part of my computer. Then put in that folder copies of things I wanted on my iPad. I could then add/remove from that folder as the mood struck and since everything in there was a copy I wouldn't lose any. (you would add/remove from the folder, then do a sync to allow iTunes to update that folder on  your iPad to match the folder on your PC)
    Another way, to get away from maintaining a folder, if you don't have a ton of photos, just e-mail them to yourself, save them from that e-mail. Keep them on the iPad as long as you like, then you can delete them as you wish. Photos that are synced onto the iPad must be synced off (as in removed from that folder then a sync performed to remove them)
    E-mailing the photos to yourself gives you more flexibility in managing them on the iPad.

  • How do I transfer music from my ipod to my computer without replacing the music on my ipod with the music on my computer?

    How do I transfer music from my ipod to my computer without replacing the music on my ipod with the music on my computer?

    You can't do that with iTunes (except for songs you purchased from the iTunes Store).  However, there are third-party methods and utilities that can transfer songs files from iPod to computer.  If you do a Google search on something like "ipod transfer," you should get some links.
    Once the songs files are on your computer, add them to your iTunes library.  Then, you can sync your iPod to that iTunes library, as desired.

  • Pages:  How can I sort one column of words and not have it affect the other columns?

    How can I sort one column of words and not have it affect the other columns?  I have opened the inspector to the edit columns and rows under Table.  It will sort the column, but then it changes the other colums as well.  I know that if I use Numbers, it will work, but I want to know how to do the same thing in Pages.

    Hi Peter,
    Numbers sorts full rows on values in selected column(s). The technique for sorting a single column is essentially the same as Jerry is describing for Pages tables—separate the (data in the) column to be sorted, sort it, return it to the table.
    In Numbers the actual column may be separated from the original table, sorted, then returned. In Pages, the data must be extracted, sorted, then pasted back in, overwriting the unsorted data (if it was left in the original table).
    iWork tables follow a database model in which each row is a Record, and each column holds a Field within the records.
    As evidenced by the current question (and several similar questions arising in the Numbers community) that model doesn't apply to the way some users, especially some who come in from the MS Excel world, use tables.
    With Excels model—islands of data on a single large table, the ability to sort one or a selected few columns of data makes sense. One 'island' may comprise only cells AA21:AH50. Sorting that small 'table' should be possible without disturbing the rest of rows 21-30, which are probably part of one or more other 'data islands' in the sea that is a MS Excel spreadsheet.
    In Numbers, each of those 'islands' would be a separate Table, and that Table would be sortable without disturbing other Tables in the document.
    Regards,
    Barry

  • How do I change the admin password in SJSWS 7.0?

    I've googled this, searched the forums, read the manual, but I haven't found anything that explained how to change the admin password for SJSWS 7.0. So, right now I'm stuck with "adminadmin" as the password, which I think is the default since I don't remember specifying that during install. Clearly I can't use this in production with the default admin password... sorry if this is a rtfm question, but I really didn't see anything in the manual about changing the admin password. Thanks!

    You could use the following CLI command:-
    wadm> set-admin-prop --set-password
    More information about the command:-
    http://docs.sun.com/app/docs/doc/819-3283/set-admin-prop-1?a=view
    You could also use Administration console-
    - Login to the Administration Console and click on the Nodes tab
    - In the Nodes page, click on the Administration Server link within the Nodes table
    - Go to "Administration Server Preferences" section in the General page and change the password

Maybe you are looking for

  • Webservice timeout ? where can we set it up in BO ?

    Hi, I post this question in this part of the forum as well in case some Xcelsius user would have had the same problem : Hi, we are using BO XI R2 Edge and we have a number of concurrent accesses licences. We have a problem handling the life duration

  • Xperia z2 dead , red light blinking when connected to usb charging cable

     My phone is totally dead, i cant do anything power button + volume up button , force restart button near the sim , and nothing happens , also when i connect to a usb charger the red light is blinking all the time . Please HELP ME i need my xperia z2

  • ITunes organization in Finder

    I hate that my iTunes files are listed by ARTIST in Finder. It makes it impossible to find anything. Is there any way to sort by ALBUM in Finder? Goodness, this is frustrating!

  • I can not move apps to SD card

    Please, help! I can not move my apps to SD card storage. When I choose "move to SD card" from Settings>Apps>Move to SD card, the moved app goes to Phone storage (USB storage). I have a 32 GB Kingston SD card but it is useless now because my memory is

  • Why are external servers STILL auto-opening when you connect to them!

    This never happened in classic. One of the many reasons why I stopped liking "macs".