Re: [munki-dev] Script for installing Munki Client remotely

949 views
Skip to first unread message

Gregory Neagle

unread,
May 26, 2013, 11:56:26 PM5/26/13
to munk...@googlegroups.com
I hope you don't literally want the two commands you list.

The first would point the Munki client at a local munki repo hosted on each machine. That's almost certainly not what you want.

The second command would set all clients to a single static manifest. If that's really what you want, just use the site_default manifest and don't configure ClientIdentifer at all.

As for remote installations of the client tools; what tools do you have to work with? ARD? SSH? None of the above?

If you have ssh access:

sudo scp -r munkitools-x.y.z.mpkg somehost:/tmp/
sudo ssh somehost /usr/sbin/installer -pkg /tmp/munkitools-x.y.z.mpkg -target /

-Greg

On May 26, 2013, at 1:55 PM, Adam <omar.abd...@gmail.com> wrote:


First off thank you for this great tool, i'm looking for a tool or script that will make my life easier by installing the Munki client remotely and quietly on the Macbooks and  execute the two commands before opening the session:
 sudo defaults write /Library/Preferences/ManagedInstalls SoftwareRepoURL "http://localhost/munki_repo"
sudo defaults write /Library/Preferences/ManagedInstalls ClientIdentifier "test_munki_client"
is there a way to do this ?? 
thank you guys

--
You received this message because you are subscribed to the Google Groups "munki-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to munki-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

A.E. van Bochoven

unread,
May 27, 2013, 4:16:25 AM5/27/13
to munk...@googlegroups.com
On May 27, 2013, at 5:56 AM, Gregory Neagle <gregn...@mac.com> wrote:

sudo scp -r munkitools-x.y.z.mpkg somehost:/tmp/
sudo ssh somehost /usr/sbin/installer -pkg /tmp/munkitools-x.y.z.mpkg -target /


I believe this should be

scp -r munkitools-x.y.z.mpkg user/root@somehost:/tmp/
ssh root@somehost /usr/sbin/installer -pkg /tmp/munkitools-x.y.z.mpkg -target /


-Arjen

Adam

unread,
May 27, 2013, 7:10:53 AM5/27/13
to munk...@googlegroups.com
Forgive my lack of experience, could you please explain to me how to proceed coz here is my complicated situation : i have a mac os server  and i use munki on it to install softs on macbooks (5 laptops) so each time i used to install and configure the Munki client physically in front of each mac, but from next week i will have 10 more macs dispersed geographically but the same network that why i'm looking for a script that can install the client and configure it and after that i will embed it into the profile manager so the user can download it.
help me please or give me another way if there is one 
thanks ;)

A.E. van Bochoven

unread,
May 27, 2013, 7:47:54 AM5/27/13
to munk...@googlegroups.com
As Greg already asked: what tools do you have to work with? ARD? Casper? SSH? None of the above?

If you don't have any remote administration tools, you could:

- Create an USB stick with a munki installer and a configuration installer package
- Point the users to a webpage with links to above installers (that is what I do for people with unmanaged machines)


-Arjen

Gregory Neagle

unread,
May 27, 2013, 10:06:10 AM5/27/13
to munk...@googlegroups.com
I think your version requires that root be enabled on the target machine. My version doesn't. I've done my version many times, but we also have ssh keys set up so we an do password-less SSH.

-Greg
--

Adam

unread,
May 27, 2013, 10:55:33 AM5/27/13
to munk...@googlegroups.com
effectively i use ssh could you please explain to me how to proceed step by step ??

A.E. van Bochoven

unread,
May 27, 2013, 11:21:27 AM5/27/13
to munk...@googlegroups.com
On 27 mei 2013, at 16:06, Gregory Neagle <gregn...@mac.com> wrote:

I think your version requires that root be enabled on the target machine.

No it doesn't, it works the same as your version.

My version doesn't. I've done my version many times, but we also have ssh keys set up so we an do password-less SSH.

I also have ssh keys setup, but with a passphrase (that is cached by the built-in ssh-agent). All admins have their own private key, the root accounts of the client machines have the public keys of all admins. I presume in your environment, that if you're root on one machine, you can login on all other machines w/o a password.

@adam:

step 1 - get the required munki package (munkitools-0.9.0.1789.0.dmg)
step 2 - doubleclick the dmg
step 3 - copy the installer pkg to your client (in the terminal: scp -r /Volumes/munkitools-0.9.0.1789.0/munkitools-0.9.0.1789.0.mpkg root@somehost:/tmp
step 4 - install munkitools (in the terminal: ssh root@somehost installer -pkg /tmp/munkitools-0.9.0.1789.0.mpkg -target /
step 5 - configure client (in the terminal: ssh root@somehost defaults write /Library/Preferences/ManagedInstalls ClientIdentifier "test_munki_client"

As you can see, you can add a command after ssh that will be executed on the client.

HTH

-Arjen
Reply all
Reply to author
Forward
0 new messages