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:
/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.|
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'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.