Deploying Files to Mac OS X via Login Script

Discussion in 'Mac OS X Server, Xserve, and Networking' started by GCW, Nov 11, 2014.

  1. GCW macrumors newbie

    Joined:
    Nov 10, 2014
    #1
    Hi,

    I'm new to this site and fairly new to Macs and UNIX commands, etc. Over the past year I have been responsible for imaging and configuring several public access Macs and a Mac Server to control them all.

    Just some background info: the Macs are running a combination of Mavericks and Leopard (no funds to pay the £285 cost to upgrade 19 Macs to Snow Leopard and subsequent free updates all the way up to Yosemite).

    The Mac Server is Open Directory and connected to Active Directory. All Macs log on using AD credentials, and use a different account for each Mac.

    We use RealVNC Enterprise for remote support, and I need to change its configuration. To do this, you create policy files (done) which are in a folder. I now need to copy this to 80+ Macs. I don't want to "push it out" from the Mac server, as this would mean doing it when all of the Macs are switched on and having to monitor which Macs have the files required.

    Ideally, I need to be able to set up a login script which will cause each Mac to pull the files down from our Mac Server when they log in. The only way I've been able to perform a file copy using Terminal is using the "scp" command. However, it prompts for a password.

    I don't want to put any passwords in a script for obvious reasons. Here's what I've tried so far:

    1. Created a test "Sharing Only" account without a password, and specified that account in the "scp" command. I was still prompted for a password, but just pressing Enter didn't work.

    2. Tried using the "cp" command, but this doesn't seem to work in the same way as "scp".

    3. Looked through the Mac Server software (Workgroup Manager - Preferences, etc) to see if there is a way of deploying files, but I can't find anything.

    4. It has been suggested that I try FTP, but I'm not sure how I could do this.

    Ideally, I'd like to avoid doing anything with "Automate" if I can help it! I don't think the management would be too pleased with the idea of a script - compiled or otherwise - which contains the password.

    Any advice would be appreciated!

    Thanks,

    Gary
     
  2. chrfr macrumors 603

    Joined:
    Jul 11, 2009
    #2
    You should look at a deployment tool like Munki:
    https://github.com/munki

    Basically, there's a client that is installed on each client, which gets applications or other software you wish to deploy from a web server. Munki is free and open source, and doesn't require admin privileges for the client system to use it.
     
  3. GCW thread starter macrumors newbie

    Joined:
    Nov 10, 2014
    #3
    Thanks for your reply. I did find Munki while researching this, although I wasn't sure if it would be the right thing. From your description, it seems like it's what I need, but how do I deploy the Munki client? Does it have to be manually installed on each client Mac or is there a way to push it out from a central point? We have over 80 Macs and they are across multiple sites.
     
  4. RobinMerryMan macrumors newbie

    Joined:
    Nov 12, 2014
    #4
    Not sure why you'd want to do this really, but I'd suggest an Igloo server to act as the middle man for the file transfer.
     
  5. chrfr macrumors 603

    Joined:
    Jul 11, 2009
    #5
    Well, you have to get the client installed on each computer somehow. You can do it with Remote Desktop, or manual installs, but if you had a deployment infrastructure in place, you wouldn't need another deployment infrastructure. If you had a way to push the Munki client, it could push anything else you need to install too. (The client is packaged in a standard Apple .pkg file, and then there's some configuration that needs to be done, either by copying a preference file, or using the defaults command.)
    Munki would be exactly what you're looking for, based on the description you've provided, but you have to start somewhere when putting a deployment system into place.
    I'm sure I'm not the first to say it, but you really should figure out a way to get those Macs off Leopard. It hasn't seen a security update in years, and there's a lot of modern software that simply won't run on Leopard.

    ----------

    No.
     
  6. GCW thread starter macrumors newbie

    Joined:
    Nov 10, 2014
    #6
    I don't agree with this rubbish.

    However, thanks chrfr for your help! I am currently investigating Munki as an option as I think it should achieve most of the things I'm looking for.

    Cheers!
     
  7. chrfr macrumors 603

    Joined:
    Jul 11, 2009
    #7
    There's a good Munki mailing list as well: https://groups.google.com/forum/#!forum/munki-dev
     

Share This Page