Showing posts with label plist. Show all posts
Showing posts with label plist. Show all posts

Monday, 6 October 2014

Apple Remote Desktop ARD preferences and presets transfer

It's always good to have a backup of all the preferences and tasks you have saved in ARD. I thought I had it sussed,  just need the file:

~/Library/Prefeences/com.apple.remotedesktop.plist

Turns out as of version 3.7 it's all been 'sandbox'ed. That means these prefences files have been moved to:
~/Library/Container/com.apple.remotedesktop/Library/Preferences/com.apple.remotedesktop.plist

But not only this, it has to have the right ACL's (permissions)

What I tried to do is copy this file between accounts and it ended up replacing the copied file with a blank one every time. It wasn't until I read this post which mentioned resetting ACL's. THis is the command they suggested using:

{ sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null
So first I copied the com.apple.remotedesktop.plist file to  
~/Library/Container/com.apple.remotedesktop/Library/Preferences/com.apple.remotedesktop.plist

I then ran the command in terminal.

Then I logged out and back in again.

Crash bang wollop it worked.

Cheers

Thursday, 9 February 2012

Installing UniFLOW client on Mac OS X 10.6 and deploying it

So, we're going to be using a UniFLOW system for our print management. Everythings working fine, just need to deploy it to all the Apple Macs under my control.

Simply set up the printers on one machine. Load up Workgroup Manager and add these printers to whatever managed computer lists you have (but make sure the managed computers have the drivers installed first!)

Next is to install the client. Luckily it comes as a mpkg file! Just have to set the preferences to pick up the right server and settings

From what I can find the settings are in a plist file:
~/Library/Preferences/com.NT-Ware.UniFLOWMacClient.plist

Although In this file there were only a few things:

TEST
aaa

Doh!

But I have also found:
~/Library/Preferences/ByHost/com.NT-Ware.UniFLOWMacClient.001b6399ade5.plist

Which contains:





LogFileName

LogonNoName

PopupForEveryJob

Reditect

ServerName
put.your.server.dnsname.here.com

(it didn't put all of the "<" and ">" things in!!

Result. Not sure what the "ByHost" folder is all about. I might look into it if just getting this plist file and putting in workgroup manager doesn't work.

So, I saved this file in the ByHost folder as ~/Library/Preferences/com.NT-Ware.UniFLOWMacClient.plist and added it to the Workgroup Manager - Managed Groups - Preferences - Details tab and set it to "Always".



Now when I load up the UniFLOW - MacClient app it comes up with the right server!

But for some reason it hasn't popped up when printing. Might be to do with the user. I'll try my login.......
.... yep worked a charm.

Just emailing the guy in charge to see if he can set up my test user the same as myself (I think the main thing to do is change the threshold for when the user gets notified).

Yep, turns out the test user account didn't have any budget or anything. Now he's sorted the account out, everything works fine!

Wednesday, 5 October 2011

Managed Preferences not working on a few Apple Macs

I look after about 140 Apple Macs, now with OS X 10.6.6. It was noticed that at least two, in one classroom, were not picking up printers and autologin items specified in Workgroup Manager as a managed preference.

It took a while but I found this forum which gave a good insight into troubleshooting managed preference on the Apple Macs. Here are a few tools:
  • Go to About This Mac > System Profiler > Managed Preferences. It will show you what preference are managed, if any.
  • From terminal use the command: mcxrefresh
  • Also from terminal use: mcxquery - much better then the refresh for troubleshooting
After trying all of these it was apparent that the machine was not picking up anything! Nothing appeared in any of these tools, so I finally referred to Workgroup Manager.

The computer was in the list, with the right MAC address. I finally had a look in the All Computers list and sorted in order of MAC Address. I found that this MAC address was listed twice! I deleted the other instance and what do you know, it worked.

Note: Always check for duplicate entries in workgroup manager!!

Sorted.


To properly refresh the MCX preferences from the client machine logged in as a user you can:

  1. Open Terminal
  2. Make sure you're a SUDO user
  3. type:
    1. sudo mcxrefresh -n USERNAME_HERE -a
    2. Password:
  4. It came up with this error though:
    1. 07] CFURLCreateWithString was passed this invalid URL string: '/Applications/Safari.app' (a file system path instead of an URL string). The URL created will not work with most file URL functions. CFURLCreateWithFileSystemPath or CFURLCreateWithFileSystemPathRelativeToBase should be used instead.
  5. but it did refresh all information and install the right printers!

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.

Monday, 16 May 2011

Mac OS X Default Paper Size plist file

For some reason in one room in particular when someone prints to the Dell Colour Laser 3110 the default paper size is Letter. I thought I'd set it up a long time ago not to be. So I've found this thread which mentions the file location for default paper size:

~/Library/Preferences/com.apple.print.PrintingPrefs.plist

It contains:

DefaultPaperID
iso-a4

Add this to a plist file to the "details" tab in a computer list group in workgroup manager and see what happens.