UNIX command for terminal

Here is what I want to do:
I want to send the terminal command to 25 laptops all at once to direct them to our internal server for software update.
I know how to log in to all of the machines at once.
osascript -e 'tell application "System Events"' -e 'keystroke "username"' -e 'keystroke tab' \
-e 'delay 0.5' -e 'keystroke "password"' -e 'delay 0.5' -e 'keystroke return' -e 'end tell'
I know how to open terminal.
open -a terminal
Now what I want to know is how to have it type this in for me:
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURLhttp://SERVER.local:8088/index-mountainlion-lion-snowleopard-leopard.merged-1.su catalog
Then have a pause and then type my password.
Bonus points for then a script to force it to check for and do the update.

You don't need to use send unix command to send osascript to login, and then open the terminal to then type in a termainl command.
you can just do
send unix command
as user root
defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURLhttp://SERVER.local:8088/index-mountainlion-lion-snowleopard-leopard.merged-1.su catalog

Similar Messages

  • Where can I get an aide memoir of unix commands for Terminal?

    Like the title, does anyone know where I could get an aide memoir of unix commands?

    Terminal Commands - 10
    Terminal Commands - 50
    Terminal Commands - 250
    Terminal Commands - Secrets

  • UNIX command for Energy Saver settings - Set Schedule

    Using ARD 3, can anyone help me with a UNIX command for setting the scheduled sleep and wake times for 10.4 clients?
    Thanks,
    Josh

    Thanks for getting me on the right track, I've been working with pmset for a couple days now and I'm having some problems getting my basic schedule that I'd like to work. I'm hoping for another nudge in the right direction. Here's the scenario:
    I need the computers to wake at 7am on weekdays and to sleep at 3:30pm on weekdays as well. I've also got an addition to make the displays sleep after half an hour of inactivity, Here's what I'm trying.
    pmset repeat wake MTWRF 7:00:00;
    pmset repeat sleep MTWRF 15:30:00;
    systemsetup -setdisplaysleep 30;
    I've been trying to push this out as a batch of commands in a template which would be slick, but the problem I'm having is that the two pmset commands don't get along and whichever one is run last cancels out the other. In the actual System Prefs of the machine I'm sending the commands to, there are the two check boxes for Wake or Power On and the other for Sleep or Power Down but I can't get them both to be checked from my UNIX commands.
    Could anyone please help, I feel like I'm so close!
    Regards,
    Josh

  • Unix Command for tracing WebIntelligence Server

    Hi All,
    Please can any one tell me that what is the Unix command for tracing WebIntelligence Server. I know we use -trace parameter. But where do we use this parameter? With which script do we use it? Please give me complete command for the same.
    Thanks & Regards,
    Ani

    Hi
    Refer "To configure server tracing through the command line"  page number 207 in http://help.sap.com/businessobject/product_guides/boexir31SP3/en/xi31_sp3_bip_admin_en.pdf
    This guide is for Windows but should be same for UNIX
    Regards
    Ashiwni

  • ARD-Unix Command for Energy Saver Settings

    I need to take out the schedule for turning on and off 100 + iMacs. The setup was done with managed preferences in OSX server but cannot be taken off now. Is there a way to turn this off using a unix command with ARD? I've been doing one by one with ARD!

    Use ARD to send the Unix command systemsetup -help
    This will return a bunch of different commands for you to look at that are related to power and energy saving settings. Make sure you send the command as the root user
    You can always read the man files for the pmset command using your Terminal app. Also check out this page too:
    http://www.hmug.org/man/1/pmset.php

  • UNIX command for disabling Firewall in Leopard?

    I'd like to use ARD to send a unix command to all my Macs running Leopard that will set the OS's application firewall to "allow all incoming connections." I believe that's the default setting, but I've run into some machines that are setting specific access - not sure how, don't really care, just want to turn it off.
    I've been reading up on /usr/libexec/ApplicationFirewall/socketfilterfw but the Help seems incomplete and I'm not sure this will accomplish what I'm after.

    defaults write /Library/Preferences/com.apple.sharing.firewall state -boolean No
    followed by a reboot works like a charm. thanks for you help.

  • Can this script be converted to a UNIX command for ARD?

    First I'd like to thank "Neil" again for providing the script below:
    set the_versions to (do shell script "mdls -name kMDItemVersion /Applications/Microsoft\\ Office\\ 2011/Microsoft\\ Excel.app")
    set the_versions to the_versions & return & (do shell script "mdls -name kMDItemVersion /Applications/Adobe\\ Reader.app")
    set the_versions to the_versions & return & (do shell script "mdls -name kMDItemVersion /Applications/Safari.app")
    set the_versions to the_versions & return & (do shell script "mdls -name kMDItemVersion /Applications/Google\\ Chrome.app")
    set the_versions to the_versions & return & (do shell script "mdls -name kMDItemVersion /Applications/Adobe\\ Acrobat\\ X\\ Pro/Adobe\\ Acrobat\\ Pro.app")
    set the_versions to the_versions & return & (do shell script "SW_vers")
    Output for this script yields exactly what I requested in the thread.  Ex:
    "kMDItemVersion = \"14.4.1\"
    kMDItemVersion = \"11.0.07\"
    kMDItemVersion = \"7.0.4\"
    kMDItemVersion = \"35.0.1916.114\"
    kMDItemVersion = \"10.1.10\"
    ProductName:          Mac OS X
    ProductVersion:          10.9.3
    BuildVersion:          13D65"
    I'd like to be able to run this command (or a variation) in Apple Remote Desktop (ARD) remotely, and as a UNIX command in order to generate a similar ARD report if possible.  Even better, I'd like the report to include the Application name and I'd like it to not to halt if an Application isn't present. My guess is that functionality like this for ARD would help a LOT of ARD Administrators because it would seem that the only way to do anything similar is to derive the metadata piecemeal (machine by machine) or end up having to wade through a ton of unwanted content using a full System Report...  Thanks.

    Forum software NOW prevents posting complete shell scripts. You'll have to piece together the code.
    First build an array of the applications that you are looking for in this form. Note; I truncated the applications.
    apps=( "/Applications/Microsoft Office 2011/Microsoft Excel.app" "/Applications/Adobe Reader.app" "/Applications/Safari.app" )
    Next loop thru the array
    for i in "${apps[@]}"; do
         printf "%s: %s\n" "$i" "$(mdls -name kMDItemVersion "$i")"
    done
    If you want to create a report then change the above loop to the following
    for i in "${apps[@]}"; do
         printf "%s: %s\n" "$i" "$(mdls -name kMDItemVersion "$i")"
    done > app_report.txt
    sw_vers >> app_report.txt
    Message was edited by: Mark Jalbert

  • Unix command for turning file sharing off

    Is there a Unix command I can use to turn off file sharing on Leopard ( as well as Tiger ) laptops? I don't mean a command to kill it for the session, I need it off even if the system is restarted. Yes, I can do it though the Preferences, but I need to do it to over 200 some laptops. We have ARD and if we had a Unix command to send to turn file sharing off that would be helpful. Thank you.

    There is a CLI for just about everything. From the [OS X Leopard Security Configuration Guide|http://images.apple.com/server/macosx/docs/LeopardSecurity_Config20080530.pdf]:
    To disable FTP.
    launctl unload -w /System/Library/LaunchDaemons/ftp.plist
    To disable SMB.
    defaults delete /Library/Preferences/SystemConfiguration/com.apple.smb.server EnabledServices
    launctl unload -w /System/Library/LaunchDaemons/nmbd.plist
    launctl unload -w /System/Library/LaunchDaemons/smbd.plist
    To disable AFP.
    launctl unload -w /System/Library/LaunchDaemons/com.apple.AppleFileServer.plist

  • Unix commands for Teachers?

    Anyone know a unix command to lock the volume on a client at a certain level? I have a script to "set" the volume. I don't want my students to be able to turn it back up.

    Have you tried using the man pages for the various commands? At the Unix command line, type "man top" (or "man <<executable name>>") and you'll get the Unix manual pages for each command. Those explain the purpose of the commands, the options and syntax, etc.
    Justin

  • Error message when using one of the built in unix commands for software upd

    I have RD3 admin software installed on my dedicated admin power mac and I have a test power mac machine on my local network. I can install packages fine using the package installer, however whenever i use the built in unix commands to list available updates on that target machinie, download available updates, or install available updates, i get the following error, any clues? ive tried running as current logged on user option, and the ARD User account I created on the machine, I can observe, control, curtain everything else, just these unix commands fail.
    Error NSURLErrorDomain -1100
    Software Update Tool
    Copyright 2002-2005 Apple
    mac mini   Mac OS X (10.4.3)  

    Check to make sure that the command is running as root. The template should enter that automatically, but try again and make sure it does.
    Hope this helps.

  • Unix commands = Mac Terminal commands ?

    Hi,
    I am a newbie to the mac and just wondering whether the Mac & Unix terminal commands are same ?
    $

    Yes they are. Since MacOS X 10.5 Leopard, the operating system has had the full Single Unix Specification certification, meaning it complies with all we normally call "unix". Of course, as JoeyR points out, it still shows its roots from the FreeBSD and NeXTstep worlds.
    If you want to compile programs in the traditional Unix fashion, by default MacOS X does not include a gcc compiler. But you can download and install the full XCode SDE for free thru the App Store, just seach for XCode. Beware it is big and will take awhile to download.
    For help in specific MacOS X Unix stuff, there is the Mac OS & System Software / Mac OS X Technologies forum.

  • Which unix command for converting xml to pdf

    Anybody know the command in unix to convert docbook xml to PDF???
    is it xsltproc or pdfwrite???
    thanx

    "ooba" <[email protected]> wrote in message
    news:gl2klg$rap$[email protected]..
    >I know this is the Flex Group, but I'm getting no love
    from the Flash
    >group.
    > 1. I need to build a thick client
    > 2. I have 0 experience with Flex or AIR
    > 3. I have built alot of Flash web components and a few
    thick clients
    > 4. I only have one week to get something working
    >
    > Can anyone tell me if it is even possible for Flash to
    generate a PDF file
    > from an imported XML file? or to browse a systems and
    allow the user to
    > select
    > an xml file to load?
    You'd need to upload the file to a server and have the server
    do this.
    > I need to have the client select an xml file that and
    the thick client
    > would
    > then use a predefined xsl file and (missing this part)
    need to convert the
    > xml
    > out to a human readable PDF format.
    Depending on what server-side technology you are using, there
    are probably
    PDF libraries you could use.
    > If you have another suggestion on how to do this please
    post suggestions.
    >
    > All I know right now is that I need to construct a thick
    client to do
    > this,
    > and being that Flash has been what I have built thick
    clients on before
    > I'd
    > like to do it in Flash rather than try and figure out
    how to do it in C#
    > .Net
    > in less than a week.
    You won't be able to do it with Flash or Flex alone.
    HTH;
    Amy

  • Auto copy command for terminal?

    I want to make Safri history folder auto copy to the other folder as it gets new history. So I can monitor activities.

    Hi,
    Here is an example :
    SQL> copy from scott/tiger@q4_production_server create ord -
    using select * from ord;Array fetch/bind size is 15. (arraysize is 15)
    Will commit when done. (copycommit is 0)
    Maximum long size is 80. (long is 80)
    Table ORD created.
    21 rows selected from scott@q4_production_server.
    21 rows inserted into ORD.
    21 rows committed into ORD at DEFAULT HOST connection.
    Hope this helps,
    Bala
    Laura Michaels (guest) wrote:
    : Am trying to use the copy command in SQL*Plus to copy a table
    : from an Oracle database to a local table on my machine in
    : another format. Keep getting errors. It seems to contact the
    : remote machine fine, but can't locate my local machine or
    figure
    : out where to put it. Any suggestions on how to set up my
    : Windows 95 machine to get the copy command working would be
    : greatly appreciated. Thank you.
    null

  • Tracert and pathping commands for terminal

    hi all,
    i need to make a pathping and tracert to contest my speed with my isp. the lag and download speed is horrible. i am only getting a summary of the hop information but not the trail. i am only getting this
    traceroute to xxxxxxxx (xxxxxxx), 64 hops max, 52 byte packets
    i want the entire trail. what's the right commad for both pathping and traceroute?

    1a) 'iwlist' is what you want - "iwlist wlan0 scan" will use wlan0 and scan for all networks
    1b) 'iwconfig' is used to connect, but you may have to use ifconfig first.  Here's a quick rundown
    ifconfig wlan0 up
    iwconfig wlan0 essid FooBar key xyz
    dhcpcd wlan0
    2) irssi and weechat are the two forerunners in the arch community as far as I know
    3) there's quite a lot - centericq, naim, mcabber, bitlbee (allows you to use an irc client like irssi)
    4) mutt, pine, etc
    5) this was covered by dolby
    6) mpd works quote well, there's also moc, and many many others
    7) 'bc' works fairly well, but it might be a but hard to use at first - try here http://www.cyreksoft.yorks.com/gnu-bc/

  • Terminal - how to find my external hard drive using unix commands

    just discovered terminal and using cd and ls commands, which are the only commands i know, i realized that i can't find my external hard drive. i thought it would be listed on my desktop, as it is in the OSX interface, but it isn't there.
    not that im skilled enough to use terminal yet, but i thought the first step would be being able to navigate the computer's files.
    really curious as to where my external hard drive is and how i can find it using unix commands in terminal.
    i was trying to figure it out myself, then i thought surely someone knows this and could tell me in a sec.
    thanks.
    ibook   Mac OS X (10.4.4)  
    ibook   Mac OS X (10.4.4)  

    "ls /Volumes" will list all volumes, including internal and external hard drives and mounted disk images. I find "disktool -l" more useful in scripts, as it tells you which volume names correspond to which "mount points" under /Volumes. Usually they're the same, but if you have two volumes with the same name, or you try to remount a removable volume before it is fully unmounted, you'll end up with a mount point that consists of the volume name with a numerical suffix.

Maybe you are looking for