How do I create a package that will install a shell script?

From various sources I have made this shell script which creates a hidden admin user, starts ard and sshd.
I would like to make this a package which will run on a machine on first boot. (I'm using deploystudio to deploy ML)
It creates a hidden user called testuser1 with the password of password1
[code]# Create user record in directory services
dscl . -create /Users/testuser1
dscl . -create /Users/testuser1 RealName "testuser1"
dscl . -create /Users/testuser1 UniqueID 401
dscl . -create /Users/testuser1 PrimaryGroupID 20
dscl . -create /Users/testuser1 UserShell /bin/bash
dscl . -passwd /Users/testuser1 "password1"
# Set up a hidden home folder
dscl . -create /Users/testuser1 NFSHomeDirectory /var/testuser1
cp -R /System/Library/User\ Template/English.lproj /var/testuser1
chown -R testuser1:staff /var/testuser1
# Grant admin & ARD rights
dseditgroup -o edit -t user -a testuser1 admin
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/ki ckstart -activate -configure -access -on -users testuser1 -privs -all -restart -agent
# Tell loginwindow not to show the user
defaults write /Library/Preferences/com.apple.loginwindow Hide500Users -bool TRUE
# Alternate: defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array testuser1
# start remote login ssh
systemsetup -setremotelogin on[/code]
I'm using package maker but it keeps failing. If I add it from somewhere like my Documents dir it says it will give my username the permissions instead of root. If I add it from / and make root the owner packagemaker errors probably because my user doesn't have the rights to it. I want it to copy somewhere then maybe have another script that copies to the same location and does an rm to remove the previous script so no admin details are left on the machine

Basicilly I want to roll out an image that will work with all models of macs which are comaptible with Mountain Lion. To do so I'm using deploystudio with the installESD.dmg as the image. This way it will install the relevant drivers for each model of mac. So the image should work whether it's a mac pro tower/mac mini/macbook.
Upon completetion deploystudio lets you run packages so I would like the script above to be in a package. I don't want it even to copy the script anywhere I would just like it to run the .sh file I've made if thats possible?
I'm just not sure what steps to take with packagemaker, I've never used it before.
But yeah the ultimate goal is: upon installation completetion setup hidden admin user that will have ssh and ard access.

Similar Messages

  • Is it possible to create a package that will install a program and then run a PS command?

    Hi,
    I need to deploy a language pack to my clients and then run a PS command to have the new language selected. Do I need to create a program for this? Is it possible to just run a PS command and prompt for a reboot? The command is
    Set-WinUILanguageOverride  en-US
    Thank you

    That works fine using the "Run another program first option". Alternatively, you can call all of your commands from a single batch file which is initiated in the program. Or you can have your PowerShell script call everything directly -- it is
    a script after all. Or you can use the PowerShell Deployment Toolkit as suggestion by Jeff.
    If you are simply calling a single PowerShell script, the command-line is the same that you would use anywhere:
    PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -Command "English.ps1"
    With the your Package containing English.ps1 of course.
    Jason | http://blog.configmgrftw.com | @jasonsandys

  • How Do i create a list that will show in a dropdown box with the list being pulled from another tab and not the cell data format junk?

    How Do i create a list that will show in a dropdown box with the list being pulled from another tab and not the cell data format junk?
    I currently run OS X 10.10.1
    Now i have been trying to work on this for a while now and what i want to do should be simple but its apparently not.
    Here is an example of what i want to happen.
    I will have 2 tabs: Contact | Sales
    Now Contacts will have the list of names and various information about a customer, While Sales will have one drop-down box for each Cell Row that will show the names of the person in tab contacts
    for what i am wanting to do i cant use the data format pop-up menu because the list is edited everyday several times a day.
    Now how do i do this, Excel can do this so how can numbers do it?

    Hi Shegra,
    Paste this into a applescript editor window and run it from there. In the script you may need to adjust the four properties to agree with your spreadsheet. Let me know if you have any questions.
    quinn
    Script starts:
    -- This script converts column A in one table into an alphabetized list of popups. It copies the last cell in that column. Then reverts the column to text. It then refreshes popups in column A of a data table starting with a user defined row.
    property DataEntrySheet : "Sheet 1" --name of sheet with popups to be refreshed
    property DataEntryTable : "Sales" --name of table with popups to be refreshed
    set copyRange to {}
    property PopValueSheet : "Sheet 1" --name of sheet with popup values table
    property PopValueTable : "Contacts" --name of table with popup values
    set PopStartRow to {}
    tell application "Numbers"
      set d to front document
      set ps to d's sheet PopValueSheet
      set pt to ps's table PopValueTable
      set s to d's sheet DataEntrySheet
      set t to s's table DataEntryTable
      set tf to t's filtered --this records filter setting on data Entry Table
      display dialog "Start from row #..." default answer "" with icon 1 -- with icon file "Path:to:my.icon.icns" --a Week # row
      set PopStartRow to {text returned of result}
      tell pt --convert list to alphabetized popups
      set ptRows to count rows
      set copyRange to ("A2:" & name of cell ptRows of column "A")
      set selection range to range copyRange
      set selection range's format to text
      sort by column 1 direction ascending
      set selection range's format to pop up menu
      -- popupsmade
      set selection range to cell ptRows of column 1 of pt
      set v to value of cell ptRows of pt
      end tell
      activate application "Numbers"
      tell application "System Events" to keystroke "c" using command down
      tell pt
      set selection range to range copyRange
      set selection range's format to text
      end tell
      tell t
      set filtered to false
      set tRows to count rows
      set pasteRange to ((name of cell PopStartRow of column "A") & ":" & (name of cell tRows of column "A"))
      set selection range to range pasteRange
      tell application "System Events" to keystroke "v" using command down
      set filtered to tf
      end tell
    end tell

  • How to Best Create a DVD that will play on BOTH Mac and Windows

    Hello - Looking for some direction. How can I create an iDVD DVD that will play on both Mac & Win? I can not find a solution that will accomplish this. What I did was create an .img then burned to DVD. This plays fine on my Mac & on home stereo DVD but not on a windows machine. The Windows machine can "read" the DVD fine but WIndows Media Player can not play it. Do I need to have folks use a special player on WIndows? Is there another format the I should have iDVD output? I need to send some DVDs to college coaches for my son and am trying to do this the best way without knowing what platform (Mac or WIn) they will be using. What is the best approach?
    Thanks in advance for your help,
    David

    Hi
    There are two ways to burn a DVD.
    • as a Data-DVD (eg including a video.img file or any data)
    • as a Video-DVD
    A. Data DVD is what You creat by just popping in a DVD disk and OK to format it.
    B. Video-DVD - You make from within iDVD and insert thed DVD WHEN iDVD asks for it
    (OR - Via Disk Util tool - Still introduced when asked to do it !)
    (or via Roxio Toast™ - STILL not inserted until asked to do this)
    So what You've done is a Data-DVD with Your movie as an .img file on it.
    • Can only be playbacked on Your Mac
    Open "Disk Util tool"
    Then on Dasktop - Double click the .img file so that it creates a fake DVD disk
    Then in "Disk Util tool" - select it and click the Burn (Nuclear) button
    THEN insert a new DVD WHEN asked to do this.
    NOW ! ! Select a lower Burn Speed eg 4xDVD - This will result in a DVD with few burn errors and
    a PC will read it easier !
    Use of quality DVD brand is also important - I use Verbatim
    I use DVD-R
    Good Luck - Bengt W

  • Acrobat 9.0 Std - How do I create a button that will show / hide the menu bar?

    In Adobe Acrobat 8, I was able to create a button that would show the menu bar using Link Properties. In version 9.0, the option I used is missing.
    The other view options are there under "Execute a menu item": View > Toolbars > File, Edit, etc.
    Any help would be greatly appreciated - thanks!

    In Adobe Acrobat 8, I was able to create a button that would show the menu bar using Link Properties. In version 9.0, the option I used is missing.
    The other view options are there under "Execute a menu item": View > Toolbars > File, Edit, etc.
    Any help would be greatly appreciated - thanks!

  • How do I create a template that will update all pages when it is updated?

    Hi everyone, I am a complete InDesign newbie, as this is my first project with it. I was wondering if there is a way to create a generic template in InDesign that, when updated, would also update all the pages made from it. The behavior I am looking for is similar to the way Dreamweaver does templates... when you create a new page, you can tell it to make the page from the already created template. That template has been pre-configured with editable regions. Anything outside the editable regions cannot be modified unless editing the template directly.
    Does this functionality exist in InDesign? I am running CS5.
    Thanks!

    drmuzik wrote:
    Hi everyone, I am a complete InDesign newbie, as this is my first project with it. I was wondering if there is a way to create a generic template in InDesign that, when updated, would also update all the pages made from it. The behavior I am looking for is similar to the way Dreamweaver does templates... when you create a new page, you can tell it to make the page from the already created template. That template has been pre-configured with editable regions. Anything outside the editable regions cannot be modified unless editing the template directly.
    Does this functionality exist in InDesign? I am running CS5.
    Thanks!
    Take a look at this article:
    http://indesignsecrets.com/free-layout-zones-add-on-is-incredible-productivity-tool.php
    Also, this commercial tool might be useful:
    http://www.rorohiko.com/wordpress/indesign-downloads/storytweaker/#Downloads
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • How do I create a form that will give a report that summarises before and after data on the same graph?

    I have a number questions that I want to know the average of all the before and after data to compare them, how do I set this up in a form in FormsCentral?  Here is an example of what I want to do - the green bar is "before" and blue is "after"

    This isn't something that you can set up in FormsCentral. It's possible to something similar with a form you create in Acrobat and use with FormsCentral, but there is no sort of built-in graphing control. The bar graph could be implemented with some JavaScript that controls annotations or fields (buttons) and perhaps some text fields.

  • How do I create a hyperlink that will open a new window, when saving a frame file as a pdf?

    I have created a hyper link in Frame using the message URL command in the marker window. I have added the target="_blank"  command after the http url within the marker. But when I then save the frame doc as a pdf and open that pdf from within a browser, when I click on the link in that pdf, it goes to the new link but it does not open in a new window or tab.
    What am I doing wrong?
    I should mention that I am using Frame 10.

    Best solution that I can find to tell you is to get Schlomo Perets' FrameMaker-to-Acrobat TimeSavers 5.0. From the FrameUsers mailing list:
    Schlomo Perets said:
    In FrameMaker-to-Acrobat TimeSavers 5.0, the "new window" link control was extended to optionally display web-based links in a new browser window (Links/General tab, Cross-file links: Open PDF in a new window, Also apply to web links).
    The function can apply to all web links (i.e. no need to modify anything in the FrameMaker file), or to individual links (in which case a special hypertext marker has to be used instead of the standard "message URL http://..." marker).
    For additional info & sample files, see http://www.microtype.com/ImprovePDF10.html
    HTH;
    David

  • How do i create a chart that will update in keynotes or pages from numbers?

    I created a table in Numbers and want to export it to Pages and Keynote. I want the changes made in Numbers to Show in Pages and Keynotes.

    Hi edwill,
    In iWork, I don't know of a way to link between documents. If you are looking for a way to update a Pages or Keynote document automatically when you update a Numbers document, I don't think that is possible. Perhaps someone who is an AppleScript guru can call in to help you.
    Regards,
    Ian.

  • How do i create a button that will always play my flv, not just once?

    I'm currently using captivate 5.5 and need to use a button to load my flv.  That button works fine and when the flv finishes it returns me back to the slide with the button on, the problem is the button no longer works when you press it again if you want to see the flv again...help!  My flv is set up to not be visible as I want it to be hidden until the button is pressed as it cover my entire slide when it loads.  I set it to run for the duration of the clip so it's great when it returns me to my slide but then the button won't make it visible again when you press it.  I tried setting the button to enable after show hoping it would reset the button but that doesn't work...as you can see I only know the basics of Captivate!

    The issue may be due to the fact that once you've clicked the button its Success criteria has been used.  This can be reset by re-entering the slide where the button is located.
    So in order to have your video play multiple times, you may need to use a different strategy than your current one.  You could try placing the video on a different slide to your button.  Set the button click to jump to that slide, and once the video has finished playing, set the OnSlideExit action to jump back to the slide with the button.  That way your button gets reset each time ready for another click to launch the video slide.

  • OK, I need to be able to have a linked TOC, and also have destinations created in FM10 that will not be lost when I 1. Save the book as a PDF. then 2.  need the PDF to be as small as possible, but without losing my destinations. Anyone know how to do that

    OK, I need to be able to have a linked TOC, and also have destinations created in FM10 that will not be lost when I 1. Save the book as a PDF; then 2. I need the PDF to be as small as possible, but without losing my destinations. Anyone know how to do that??
    I had been saving as a PDF and then reducing the size of the PDF by printing it as a PDF with a degree of image compression. I write manuals with a LOT of screen captures and line art that needs to be clear. So it is a balancing act between image clarity and PDF size. The PDFs on the web need to be smaller - sure you can undertsand.
    Anyway, when I print the PDF again, I lose both my destinations and bookmarks.
    Anyone know of any way to avoid that?

    Control the images by creating a custom PDF Job Options and then selecting it in the PDF Job Options drop-down of the PDF setup dialog box (File > Save as PDF...)
    Create the custom PDF Job Options file with Distiller. If you do not have Distiller, open the Printing Preferences of the Adobe PDF printer. Start with the Smallest File Size Job Options settings and Edit.

  • How can I create an icon that when clicked will open and maximize an image file?

    How do I create a icon that when clicked will open and maximize an image file?  I have tried to use the simple image widget with maximize upon tap/click - however I am can only size the image really small and put on the page.  I'd prefer to have a graphic that when clicked it simply opens up the image.  This is for a very simple question/answer book.   The user is suppose to look at a picture and locate something.  I want to put an 'Answer' graphic on the image and then the user can click the 'answer' graphic and it will open up the picture with the answer identified. 
    Is this possible?

    Have yiu tried the PopOver widget?  You can drop an image into it, maximise the image and the widgets window...But, you cannot get it full screen.
    With iBooks Author, you either learn to use what is available within the app, or look online for third party widgets to purchase which suit your project.

  • In DPS/Indesign for iPad - How can i create a button that once tapped, will pre-populate an email?

    In DPS/Indesign for iPad - How can i create a button that once tapped, will pre-populate an email? like when you tap a recipe in Marth Stewart Every Day Food for example....

    http://forums.adobe.com/message/4190932

  • How to create a form that will allow the applicant to upload their photo

    I have Adobe Acrobat 9 Pro Extended and I know how to create forms that require text input.
    How to create a form that will allow the applicant to upload their photo? I alo wish to know how to upload a photograph so that I can test the form I created.
    Thank you
    Adrian Watts

    test@ORA10G> with x as (
      2    select '234-1111' as customer, to_date('2-Jan-2008','dd-Mon-yyyy') as call_date, 'Order product' as reason from dual union all
      3    select '234-1132', to_date('3-Jan-2008','dd-Mon-yyyy'), 'Request info' from dual union all
      4    select '231-1154', to_date('4-Sep-2007','dd-Mon-yyyy'), 'Request info' from dual union all
      5    select '234-1111', to_date('2-Nov-2007','dd-Mon-yyyy'), 'Order product' from dual union all
      6    select '234-1132', to_date('9-Jan-2008','dd-Mon-yyyy'), 'Request info' from dual union all
      7    select '231-1154', to_date('9-Sep-2007','dd-Mon-yyyy'), 'Request info' from dual union all
      8    select '234-1111', to_date('5-Dec-2007','dd-Mon-yyyy'), 'Order product' from dual union all
      9    select '234-1131', to_date('7-Dec-2007','dd-Mon-yyyy'), 'Request info' from dual union all
    10    select '231-1154', to_date('1-Sep-2007','dd-Mon-yyyy'), 'Request info' from dual union all
    11    select '234-1111', to_date('8-Jan-2008','dd-Mon-yyyy'), 'Order product' from dual union all
    12    select '234-1131', to_date('3-Dec-2007','dd-Mon-yyyy'), 'Request info' from dual union all
    13    select '231-1154', to_date('4-Nov-2007','dd-Mon-yyyy'), 'Forward to Sales' from dual)
    14  --
    15  select customer,max(call_date), reason
    16  from x
    17  where reason = 'Request info'
    18  group by customer, reason;
    CUSTOMER MAX(CALL_ REASON
    231-1154 09-SEP-07 Request info
    234-1131 07-DEC-07 Request info
    234-1132 09-JAN-08 Request info
    test@ORA10G>
    test@ORA10G>pratz

  • How to create a program that will accept a series of strings of 0 and 1 onl

    how to create a program that will accept a series of strings of 0 and 1 only then displays 0 as 48 and displays 1 as 49.

    Isn't one thread enough for your homework?
    http://forum.java.sun.com/thread.jspa?threadID=5253850&messageID=10051155#10051155

Maybe you are looking for

  • ITunes could not restore the iPhone "___'s iPhone" because the backup was corrupt or not compatible

    Ok so bear with me here, it is somewhat of a long story.      I had been using an iPhone 4 for a while, with an old iTunes account that has all my stuff from over the years on it, on my computer. A week ago, I dropped by iPhone 4 in the sink and it g

  • Is the new Canon EOS 7D Mark II supported in Creative Cloud?

    Is the new Canon EOS 7D Mark II supported in Lightroom and Photoshop in Creative Cloud?  If not, is there anyway to know when it will be? My current version of Lightroom (5.6) does not recognize the RAW files from this camera.

  • Exceptions in BI 7.0 Query Designer

    Hi Guys, I have a requirement where based on Net Supply and Product classification, conditional formatting need to be applied. Below is the scenario. Product Class                                          Week1      Week2      Week3     Week4    Week

  • BPC 7.5 SP06 open IS SP05 Error Dimension

    Hi, i am working in Client using SP06 the BPC 7.5 NW Client, and working too in Client using 7.5 SP05. I have the Client for NW 7.5 SP06 BPC and I can not open InputShedules the SP05 version, get CurrentView problem in Dimensions. Any idea ? Thank yo

  • OSStatus error -128 trying to move file??

    I have some video files on an external hard drive that I'm trying to copy or move back to my iMac. All the files transfer without a problem except for two which give me the following error: Error! An error occurred. The operation couldn't be complete