FileWave Alliance

The Official Community Forum
  • Page:
  • 1

TOPIC: Use Wildcard with Folders and Empty Fileset

Use Wildcard with Folders and Empty Fileset 08 Sep 2017 16:49 #2689

  • Cody Nelsen
  • Cody Nelsen's Avatar Topic Author
  • Offline
  • 2nd Level - Yellow Belt
  • 2nd Level - Yellow Belt
  • Posts: 17
  • Thank you received: 0
Is there anyway to use a wildcard with folders and placing a file? I need to send out a certificate for Firefox, and to do that you just copy the cert8.db found in /Users/user/Library/Application Support/Firefox/Profiles/*.default. First I need to push it to all users. Second, the Profile folder (*.default) is a different random set of characters for each user. Thanks.

Use Wildcard with Folders and Empty Fileset 08 Sep 2017 17:55 #2690

  • Bao Tran
  • Bao Tran's Avatar
  • Offline
  • FileWave Staff
  • FileWave Staff
  • Posts: 102
  • Karma: 4
  • Thank you received: 13
Sorry, FileWave doesn't support wildcard with folders and placing a file. The best way to do what you want would be with a postflight script that enumerates all folders in /Users, goes into each user folder, enumerates the contents of /Users/user/Library/Application Support/Firefox/Profiles/ to get the unique folder name, and then copy the certificate file there. You can also use "dscl . -list /Users" to get a list of valid users to avoid copying the file to random folders in the /Users folder aren't home folders for a users.

Use Wildcard with Folders and Empty Fileset 08 Sep 2017 20:30 #2691

  • P-M Lejon
  • P-M Lejon's Avatar
  • Offline
  • 5th level - Black Belt
  • 5th level - Black Belt
  • Posts: 92
  • Karma: 3
  • Thank you received: 15
I've actually done that for our internal certs.
Please excuse me for lack of details. It's Friday evening over here ;-)

To do this in a proper way, you actually need to use NSS:
developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS

My solution is to compile NSS. Please find the current source code here:
ftp.mozilla.org/pub/security/nss/releases/

Then
  1. Deploy the compiled NSS to a directory you control with FileWave
  2. Deploy the cert to a controlled directory in a similar way
  3. Modify the attached script so that it contains the paths from above
  4. Modify the attached LaunchAgent.plist so that it contains the paths to the script (and have a name that reflect the name of your company)
  5. Deploy script+LaunchAgent.plist

If you've done everything right, the users should have the cert inserted after next login.

Please please please, test it before deploying. I.e, by running this on your test machine:
bash -x /path/to/script

Have fun!


edit: The reason why you need to edit the script is that my original contains paths that definitely won't be present on you clients. Also added a not on changing the name of the plist.
Attachments:
P-M Lejon
System Administrator
BonnierNews
Sweden
Last Edit: by P-M Lejon.

Use Wildcard with Folders and Empty Fileset 14 Sep 2017 20:32 #2705

  • Cody Nelsen
  • Cody Nelsen's Avatar Topic Author
  • Offline
  • 2nd Level - Yellow Belt
  • 2nd Level - Yellow Belt
  • Posts: 17
  • Thank you received: 0
What I did was use CCK2 to create an autoconfig for Firefox. Then you just place the files generated by the autoconfig into the right folders in Firefox.app with Filewave.
  • Page:
  • 1