Showing posts with label Task Server. Show all posts
Showing posts with label Task Server. Show all posts

Monday, 8 October 2012

Setting all Apple Macs to use network time servers

So I wanted to change all the Macs here to use our specific network time servers so that their time is never out and so cause login issues. I did it by first finding the command line arguments, then making a shell script, then making a pkg file which the OS X task server sent to all the machines when they are powered on.

Here's the step by step guide:

  1. finding the command line arguments:
    1. sudo systemsetup -setnetworktimeserver your.time.server.ac.uk
    2. sudo systemsetup -setusingnetworktime on
  2. making a shell script
    1. make a new plain text document using "TextEdit"
    2. make the first line:
      1. #!/bin/bash
    3. paste the two lines from 1.1 and 1.2
    4. save as (untick "add .txt file extension) and put .sh at the end
    5. make it executable
      1. in terminal type:
        1. chmod 744 nameOfShellScript.sh
  3. make a .pkg file which runs this script
    1. I use Iceberg. Here are the screenshots:


    2. When done, go to Build > build
    3. navigate to the project folder in Finder and inside the "Build" folder you'll find the .pkg file.
  4. test it on a computer
  5. Send to all machine
    1. I use Apple Remote Desktop Task Server for this
      1. select the computers in a list
      2. click "Install Packages"
      3. select the package
      4. select "run this task from: The Task Server on your.task.server.ac.uk"
      5. sorted
    2. sorted
  6. sorted

Thursday, 4 October 2012

sendLogon.app and installer

Well, after much troubles over getting NHR to also run sendLogon on startup, I decided to just make an application which ran the sendLogon script:

/usr/bin/sendLogon 145.xxx.xxx.xxx 5438 $(logname)



  1. I simply made it in Automator:
  2. Next I made an installation package to install it along with the sendLogon command program
I used Apple Remote Desktop's "Task Server" to install it on all managed machines. And finally I used Workgroup Manager to have it as a Login Item on the managed machines.

I think it works out better this way, as there is a little bit more control over it.

Friday, 20 April 2012

Deploying Maya 2012 and Backburner

So, I want to set up a nice little render farm, and so need all machines to have the software on. First things first, deployment.

I had a look at the Maya install dmg and found that the initial application is not a pkg file. But fortunately, inside the package contents:
/Volumes/Maya/Install\ Maya\ 2012.app/Contents/Resources/Maya....

  • Maya2012.mpkg
  • Additional Items
    • ADC_docs6.0.pkg
    • AdLM_standalone.mpkg
    • AutodeskBackburner2012.mpkg
    • AutodeskDirectConnect6.0.pkg
    • AutodeskUninstaller.pkg
    • Composite2012.pkg
    • CraftDirectorStudioMaya2012.dmg
    • Maya_quicktime_components.pkg
    • autodesk.backburner.monitor-2012.0_423_i386.pkg
    • autodesk.webentry-1.0-603.i386.pkg
    • backburner-2012.0_1560_i386.pkg
    • dmmPluginForMaya2012x64.pkg
All I did was to highlight all these files and have Apple Remote Desktop install them for me, minus "CraftDirectorStudioMaya2012.dmg" which I am don't think I need.


On going to the computer I tested this process on, I found that a user was already logged on and a message saying:
a certain process needed "Rosetta" installing should I do so?

I clicked yes and forgot to read which Application it was. Looking in the logs I found:
20/04/2012 11:44:06 com.apple.coreservices.uiagent[1050] 11:44:06CoreServicesUIAgent[1050] : Application failed to launch (id = aksusbd, version = Unknown reason = kLSNoRosettaEnvironmentErr)

It was this "aksusbd" which needed it.

I also found in the logs that the install process tries to start backburner and comes up with the same error message I came up with here:
/usr/discreet/backburner/backburner: line 64: syntax error: unexpected end of file


I can fix this simply by copying the fixed version of the backburner file


just found this update for backburner. Found on this page

Friday, 30 March 2012

OS X multiple login scripts - sendlogon and NHR

So, after having NHR running for quite a while, it looks like we also need to have sendlogon running at login. This isn't the first time I've had to have multiple login scripts. I remember doing this for BootPicker back when it wasn't included in the operating system.

So to do this I will use the system already in place thanks to NHR. At the moment, at login, the file /etc/login.hook runs. This runs any scripts within the /etc/hooks folder which begin with "Li". The same thing happens for logout but with any files beginning with "Lo". So, all I have to do is to rename the "login.sh" script something like "Lisendlogon.hook" and it will run at login.

Now, this "lisendlogon.hook" script simply contains the command to run the "sendlogon" program plus the right syntax to put after it. i.e. the server and the current users credentials. This is how it looks:

#!/bin/tcsh
/usr/bin/sendLogon dns.name.of.server.com 3898 $1

The sendLogon is in the /usr/bin folder, as this is where their tutorial says it should be.


After testing this, I need to make an install pkg file to run from the task server. I like using IceBerg.


So, here's some screenshots from it:
Iceberg - fix NHR and sendlogon settings page

postflight installation scripts.
writeloginhook.sh contains:
#!/bin/tcsh
sudo defaults write com.apple.loginwindow LoginHook /etc/login.hook
which tells the operating system to run /etc/login.hook at login. 

iceberg - files section. Later found the default destination needs to be "/"
I got slightly confused as to which folder to make the default destination?

I'll test it out on a computer suite machine to see if it works.

After a little testing, it looks like it didn't put sendLogon into /usr/bin! After trying a few things it turns out it was down to the "Default Destination". After setting this as "/" it worked. It looks like this is basically the folder which all installation folders have in common.
Iceberg - files section with the correct "default destination" as the lowest common folder.

Tested and works fine.

Cheers

Thursday, 9 February 2012

Deleting all print queues on OS X using Command Line

So, here's a little script which deletes all the print queues on OS X. I run it through Apple Remote Desktop's "Send Unix Command" as root:


for printer in `lpstat -a | awk '{print $1}'`
do
echo Deleting $printer
lpadmin -x $printer
done

We're moving our print server to a UniFLOW system and so I need to get rid of all the print queues and add new ones (adding them through Workgroup Manager).

Thought I'd make a little pkg file which I can send to all machines through ARD Task Server. I did it through Iceberg. Here's a few screen shots of it with notes:

Adding a preflight script to run

This is the script which runs on preflight


Simple really, but works.

Friday, 27 January 2012

Apple Remote Desktop Task Server trouble

Just after rebooting the xserver I noticed an error in the logs made by ARDAgent:

Jan 27 14:20:19 Xserve ARDAgent[460]: Bind error on TCP port 3283.  Error number: 48 Address already in use

Looking at remote desktop on my machine I noticed it was having trouble communicating with the task server. I tried restarting the ARD service to no avail.

I looked through some more logs as it appeared that something else had taken that port. The only logical things would have been iChat and another VNC service running. I checked IChat out and it wasn't running. I did find another log entry just after reboot, but before the ARD error which was registered to OSXVNC. Sure enough this was running. I shut down the service and made sure it wasn't starting up any more at startup.

As soon as this was done the task server was back up!

Xserver OS X 10.4.11 no ping

We've been having this problem where the server doesn't return a ping for some time. The work around is to simply unplug the network cable and plug it back in. I have noticed on two occasions (I didn't check the other occasions) that in the system log:


Jan 27 14:38:44 Xserve servermgrd: servermgr_dns: no name available via DNS for 172.25.1.81
Jan 27 14:38:44 Xserve servermgrd: servermgr_dns: no reverse DNS entry for server, various services may not function properly
Jan 27 14:38:44 Xserve servermgrd: servermgr_dns: gethostname() doesn't match the configured name - use changeip to repair

It might be worth running this "changeip"

Wednesday, 16 November 2011

Deploying Canon EOS 230M stuff on Mac OS X using Iceberg

So we have some lovely HD SL Cameras from Canon. Some sort of EOS model. Very nice. It comes with some software which you need to use these cameras with OS X. Unfortunately Canon neglected to use Apples standard package installer concept and made there own (or bought one it). So I've now got to find a way to put this software on all the machines.

There are two simple ways:

  1. would be to simply copy these applications to other computers.
  2. Would be to utilise the "Record" facility in the Application "Package Maker" which would hopefully record the files and scripts that the Canon install program performed. (Can't find a copy of Package Maker though!)
Having tried number 1. it looks like it's worked alright. So next is to make a pkg file which puts these apps in the Applications folder. I shall refer to a previous post here how I made a pkg file which installed "fix everything please" and sendlogon.

So, here's how I did it:

  1. I used a free Application called Iceberg
  2. Made a new project and created a nice little folder for the project
  3. Entered the standard details for the Settings
    1. I put Admin Authorisation so there would be some control
  4. Skipped through the other sections to get to the Files section
    1. I made /Applications the Default Destination
    2. In Applications I right clicked and selected "Add Files..."
    3. I selected the folder which was in my Applications folder on the computer (I'd installed it earlier)
    4. I noticed that it didn't show the folders inside the "Canon Utilities". I was just about to click the "Add files..." option again but I did see an option to "Expand All". I clicked it and what do you know, it updated the folder to have all the subfolders it should have had!
  5. Next I clicked "Build" and it was done.
Just doing testing at the moment...

Yep, works like a dream!

Tuesday, 15 November 2011

Why NHR didn't work! Finally

So, after many, many trials and tribulations I've finally worked out why NHR wasn't working. Simply because I tried to install it over itself. Basically the files were already there. Doh!

So to fix it in all the mac suites I basically have to:

  1. Get rid of the NHR files on't computers
    1. run the uninstall file
    2. run a small script to delete the /etc/hooks and /etc/login.hook and /etc/logout.hook
  2. Install the NHR.pkg file again (through task server)
So, as I'm running it all through the task server anyway, I'll try and line up the uninstall and install files sequentially, so that it works in the right order. It should do.


Done 

Friday, 30 September 2011

Making a pkg file for installing sendLogon for Bloxx on OS X

In a previous post I described how we're getting a new web filtering system called Bloxx, which needs the sendLogon program to be installed and run as a login script on all the Apple Macs (OS X).

I used Iceberg free application to make the PKG file as I've used it before with relative ease, and also couldn't find the latest official Apple PKG maker app!!

Its all working now so here's how I did it:
  1. Made a new project in Iceburg, and made a nice little folder to hold all the files needed (makes it easier to find things)
  2. I filled in the top section "Settings"
  3. Next was the "Scripts" section. I had to make a script which changed the com.apple.loginwindow plist file to add the LoginHook /usr/bin/login.sh
    1. I ran nano from the command line (nano ~Desktop/sendLogonfiles/Install\ sendLogon/writeloginhook.sh)
       and typed:
    2.  #!/bin/tcsh
      sudo defaults write com.apple.loginwindow LoginHook /usr/bin/login.sh
    3. I found I had to put "sudo" into the script so that it had the right permissions to write to the file. Not sure why else it didn't work?
    4. I saved the file and made the file executable - chmod 755 ~Desktop/sendLogonfiles/Install\ sendLogon/writeloginhook.sh
  4. I then added this script to the "PostFlight" script, and set the path to "Relative". Note - I found an article here documenting the definition of each of these types of scripts. Most were concerned with whether this was an upgrade or not, and would only run once.
  5. Finally was the "Files" section. 
    1. I firstly put the files in the project folder.
    2. I set these files with the correct permissions (as in the tutorial folder for sendLogon). chmod 755
    3. Then, in Iceberg, I had to add the folders; /usr/ and /usr/bin/, which were not there.
    4. I then made the "Default Destination" the /usr/bin/ folder
    5. Finally I added the login.sh file and the sendLogon file.
I've just tested this through the Apple Remote Desktop Task Server on a single MacBook Pro and worked a charm (had to ring ICT though to add its' IP address to the Bloxx list of computers with sendLogon working)

Note: There is potential also for adding to this a little script which changes the proxy settings to the system and maybe also Firefox, but it would be easier to control these settings through a .pac file or .wpad file.

Wednesday, 28 September 2011

New Web Filter - Bloxx and sendLogon deployment on OS X

So we've now got a new web filtering system which needs testing on the Macs and then deploying. The new system is currently running alongside the old, the later of which will slowly be phased out.

The new system does come with one small bonus for the Apple Macs as it works alongside a program called "sendLogon" which sends the credentials of the user to the server and automatically authenticating them to use the internet. This sendLogon was downloaded here, and comes with instructions:


Running sendLogon automatically on Mac OSX
You need to take the following steps:

1) Download the Send Logon program from http://www.bloxx.com/downloads/sendLogon_osx_10.4.universal.tar.gz to the desktop.
2) Browse to ‘Applications->Utilities’ and run the ‘Terminal’ application.
3) Type ‘cd ~/Desktop’.
4) Type 'tar zxvf sendLogon_osx_10.4.universal.tar.gz'.
5) Type ‘sudo cp sendLogon /usr/bin’ and enter your password when prompted.
6) Type ‘sudo nano /usr/bin/login.sh’.
7) Enter the following lines:

#!/bin/tcsh

/usr/bin/sendLogon 3898 $1

8) When finished, press ctrl-o followed by return, to save the file.
9) Press ctrl-x to exit.
10) Run the following commands to set the correct permissions on the utility and login script:

sudo chmod 755 /usr/bin/login.sh
sudo chmod 755 /usr/bin/sendLogon

11) Run the following command:

sudo defaults write com.apple.loginwindow LoginHook /usr/bin/login.sh

The sendLogon utility should now run for every user that logs on.
This all worked splendidly. Our server address is XXX.XXX.XXX.21. The proxy settings are XXX.XXX.XXX.23 port 8080 though. Just need to remember that the computer has to be in the list of this filter system as using the sendLogon program (took me 20 mins before I remembered this!).

To deploy this the idea is to create a pkg file which copies the two files login.sh and sendLogon to /usr/bin and also sends the command for the LoginHook.

Note that all the Macs I will run this on do not have any login scripts which run from the computer and hence it doesn't matter if you overwrite the login.sh file. For those who do have login scripts then they will need to append to this file, which isn't too hard.

I will use the Iceberg App to create the pkg file and run it through the task server to deploy to all computer suites and staff machines.

We did have a choice whether to control the LoginHook from the Xserver or just have the clients controled locally. We chose the later as ICT Services do not control the Xserver, which is just used for the one Directorate.

I shall note in a later post how I created the pkg file.

Friday, 23 September 2011

Installing Wacom Intuos 4 drivers through Apple Remote Desktop

A student brought in his Wacom Intuos 4 graphics tablet which I promptly installed on one of the computers, using the provided CD. They do all have Bamboo drivers, but it is slightly different for Intuos 4. I promptly found the .pkg file on the disk, which is in the "Program Files" folder on the CD.

I put this in Apple Remote Desktop for install and tested it on another mac. It came up with an error:
Error message: "Running Package Scripts..."

the "..." assumes that this might just be the extra little bits at the end of the installation. On looking on the computer it appeared to have installed the preference pane so I was pretty happy. Not sure what these extra "scripts" are but they might be for just removing files and such, hopefully nothing too important.

I later ran the install through the task server, to install on all in the computer suite. I expected the error which actually came up as:
Completed but failed on one package: "Install Wacom Tablet"

Anyway, I shall have a proper look later to see if it's worked as expected.

Wednesday, 15 September 2010

Apple Remote Desktop Task Server setup

Well, it's been 6 years since I've started using ARD and to think how much easier it would of been if I'd have only looked into using a Task Server. Doh!

Basically, if the client is offline then just send the job to the task server and when it's back online again it'll do the job.

So here's the basic principals of setting it up


  1. You install the ARD on both server and admin machines, but you'll need two separate unlimited licenses!
  2. on the server you go to the preferences, and under task server you say "Use Task Server on this computer" and "allow incoming connections"
  3. On the admin machine you say "Use task server ...." and you put the address of the task server in there.
  4. On the admin machine you add the machines to whatever lists you want, you don't need to add them at all to the task server.
  5. When you want to install a pkg file, you set it all up; add the package, sort out which computers to do it on, and then just click install. It'll zip the pkg file up and send it to the task server (might take some time) and the task server will sort the rest out.
Sorted. I shall update this post with more info if it doesn't work so well!!!!