Giter VIP home page Giter VIP logo

depnotify-starter's People

Contributors

arekdreyer avatar big-rat avatar bradtchapman avatar captam3rica avatar homebysix avatar kbareis avatar krypted avatar smashism avatar zackn9ne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

depnotify-starter's Issues

Error in Line 276

This line does not work on already named computers. We are currently running Jamf Cloud v10.31.1-t1628520988.
"$JAMF_BINARY" setComputerName -name "$REG_TEXT_LABEL_1_VALUE"

In order for it to work the flag -set also needs to be added:
"$JAMF_BINARY" setComputerName -set -name "$REG_TEXT_LABEL_1_VALUE"

Add Parameter Support with Policies

Is your feature request related to a problem? Please describe.
Script may be used by different groups within an organization or for different purposes. Instead of creating multiple different scripts and uploading them, it would be nice to have a few key variables be able to be set by parameters in Jamf's policy.

screen shot 2018-10-19 at 2 07 07 pm

Ideas

  • Add true/false options as configurable items, thanks @sepiemoini
  • Modify current core code to allow the script to read from Plist to enable single script multi language support. Ex, 1 plist for English, 1 for Spanish. This would require an admin to modify and deploy a plist with the shell script for proper functionality. There would then be a flag in policy to point the script to the correct language

Text Fields and popus at registration not appearing..

Describe the bug
When I configure the text and popups to appear at Registration "true" The window appears and "register this mac" button ok. However, the text and popup fields are not showing, only a clear white box.
I click register and it runs through stating that no entries have been made for computer name, department , building etc.
Attached screenshot of splash window

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Logs
Please attach the following logs:

  • /var/tmp/depnotify.log
  • /var/tmp/depNotifyDebug.log
  • /var/log/jamf.log

Software Versions (please complete the following information):

  • macOS Version 10.13
  • Jamf Version 10.10
  • DEP Notify Version 1.1.0

Additional context
Add any other context about the problem here.

Using DepNotify as a Better Deferral Tool

I’ve been looking into better jamf deferral policy tool -

https://github.com/haircut/better-jamf-policy-deferral

And was pondering if Jamf could use DepNotify to offer something similar? I really want to get all staff onto Office 365, and a new Adobe license, and I think using depnotify might be great for that. Have the window pop up once to explain why the upgrade is important, with options to start or defer. THen as we get closer to the date they need to install by, Depnotify pops up in ways that is increasingly hard to ignore - so like the first pop up is just the window, but each pop up after the background is blurred a little more, just a subtle way of reminding people that we’re serious. I think Depnotify has all the tool there to make a great referral tool that is way better than Jamf’s current options. Thoughts?

Testing Mode

TESTING_MODE=true
The splash screen shows the stuff being installed, but they are not.

TESTING_MODE=false
As soon as the DEPNotify starts I get: COMPLETE_ALERT_TEXT="Your Mac is now finished with initial setup and configuration. Press Quit to get started!"

DEPNotfiy

Describe the bug
Running DEPnofity in production Registration Screen opens on the screen but there no fields to allow you to name the computer, select building or department etc.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
When the Registration Screen opens, we should be able to name the computer, select building or department etc.

Screenshots
If applicable, add screenshots to help explain your problem.

Logs
Please attach the following logs:

  • /var/tmp/depnotify.log
  • /var/tmp/depNotifyDebug.log
  • /var/log/jamf.log

Software Versions (please complete the following information):

  • macOS Version [10.13.6]
  • Jamf Version [10.22.1
  • DEP Notify Version [1.1.3]

Additional context
Add any other context about the problem here.

GUI not starting…

Hey @kbareis!
I've noticed that the DEPNotify.app has a bad habit of not starting. It happens in 95% of the cases.
The script is performing the installation (no argues there) but there is no GUI, which defeats the purpose of the entire thing 🙂
If a double click the DEPNotify.app in the Utilities folder, than the app starts and I can see the progress and such.
But by itself, I mean automatically, DEPNotify.app, doesn't start most of the times. 😕

DEPNotify 2.01

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Logs
Please attach the following logs:

  • /var/tmp/depnotify.log
  • /var/tmp/depNotifyDebug.log
  • /var/log/jamf.log

Software Versions (please complete the following information):

  • macOS Version [e.g. 10.14.0]
  • Jamf Version [e.g. 10.7.1]
  • DEP Notify Version [e.g. 1.1.0]

Additional context
Add any other context about the problem here.

Continuing issues with the Registration Window

I'm still having issues with the Registration window appearing (incorrectly) a second time at the end of the DEPNotify workflow, preventing the app from quitting properly.

I'm using 1.2.0 of the depNotify script along with the updated version (1.1.2) of DEPNotify that was posted a few weeks ago in the MacAdmins Slack instance.

I thought perhaps some of the minor modifications I made to depNotify.sh might have been responsible but even copying the script exactly with zero mods still results in the Registration window coming up twice.

Here's the script parameters I'm using in my policy:
image

The test client is a freshly restored 2018 MacBook Pro running 10.14.1, managed by Jamf Pro 10.8.0. I'm currently baffled what might be triggering this bug for me but not other people.

DEPNotify 2.01

I'm trying to manually run DEPNotify script 2.01 in testing mode "False" and I continue to get setup error when I run it. Changing back to True works. Is there a reason for this?
I've tried various versions with same issue.

carriage returns (\n's) in MAIN_TEXT and elsewhere

The depnotify.log must end up with the escaped carriage returns (\n's) in it, so the script needs to better escape the 's or it will put carriage returns into the file. I've ended up having to change the script to put them as \\n instead of \n.

I've been noticing my MAIN_TEXT only showing the first line in the dialog, and discovered the issue was because the \n's would go into depnotify.log translated to carriage returns, when depnotify.log requires the \n's.

I've been seeing this on macOS 10.15 and above, with DEPNotify 1.1.6 (I'm not using dev on macOS 10.14 or earlier, as we are treating 10.14 and earlier as unsupported).

DEPNotify Keeps Running in Test Mode

I have been using the DEPNotify starter script for a while and had to update today.

The script keeps running in test mode even though i have the variable set in script parameters of the policy to "false"

Was wondering if there is anything to correct this. Or if the script parameters from the previous versions no longer match up?

Tabbing doesn't work as intended

Describe the bug
I'm using the default example in the script of Computer name, asset tag, home office and department. However, hitting the tab key only goes back and forth between computer name and asset tag, instead of tabbing through all 4 fields and the continue button.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'First popup page with text input'
  2. Click on 'Computer Name'
  3. Hit tab a few times to see it bounces back and forth between two instead of cycling through the text boxes and drop downs
  4. See error

Expected behavior
I was expecting to be able to tab through all options as well as the continue button.
Screenshots
If applicable, add screenshots to help explain your problem.

Logs
Please attach the following logs:
jamf.log
depnotifyDebug.log
depnotify_old.log

Software Versions (please complete the following information):

  • macOS Version 11.2.1 and 10.15.7
  • Jamf Version 10.25
  • DEP Notify Version 1.1.6

Additional context
Add any other context about the problem here.

Starter failing on OSX 12.3 fyi

Describe the bug

Python 2.7 is now removed on OSX 12.3 and replaced with python3 but xcode is required to install which is a heavy 5.43GB before it can run the script

To Reproduce
Run script 2.0.5 on OSX 12.3

Expected behavior

Script result: /Library/Application Support/JAMF/tmp/DepNotify03TEST: line 542: /usr/bin/python: No such file or directory
usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
[command]
usage: sudo [-AbEHknPS] [-C num] [-D directory] [-g group] [-h host] [-p
prompt] [-R directory] [-T timeout] [-u user] [VAR=value] [-i|-s]
[]
usage: sudo -e [-AknS] [-C num] [-D directory] [-g group] [-h host] [-p prompt]
[-R directory] [-T timeout] [-u user] file ...

Screenshots
Screen Shot 2022-03-22 at 12 12 04 PM

Enhancement Tracker/Poll - Registration Window

Per @remusache's request for additional features, I thought it might be good to start an issue where I could potentially track requests for a registration window and possibly implement the most commonly requested options. So far, I was thinking about options around the following topics:

  • Computer Name text field
  • Asset Tag text field (in Jamf)
  • Department Dropdown (in Jamf and for those who don't use a directory service)
  • Building Dropdown (in Jamf and for those who don't use a directory service)
  • Room Dropdown (in Jamf and for those who don't use a directory service)

Any need for the following?

  • Bar Code 1 (in jamf)
  • Bar Code 2 (in jamf)

Ones I wasn't planning to add

  • Username (directory service is a better source of truth)
  • Full Name (directory service is a better source of truth)
  • Email Address (directory service is a better source of truth)
  • Phone Number (directory service is a better source of truth)
  • Position (directory service is a better source of truth)
  • Purchasing Information (as DEP Notify was designed for user on-boarding)

Custom EA input in the Registration Window

I'm currently using this as my script:

https://github.com/fulltimecasual/DepNotify-at-Swinburne-Scripts/blob/master/1.%20DepNotify%20with%20User%20Input.sh

Similar to the scripts of John Mahlman and Neil Martin, so scope to labs or Staff based on a custom EA.

I could merge my script (or at least the Registration window!) with yours, but I fear I'll break something. Would be great if you had one or two custom EAs added that you could comment out if you didnt need them, perhaps commented out by default?

Also love that in the script I'm using, if re-enrolling a Mac it doesnt show the Registration Window. That's needed for my environment when re-imaging labs for semester

Installing Homebrew via DEPNotify

Describe the bug
Every time I have DEPNotify call my homebrew policy it fails. I’ve tried sudo -u $CURRENT_USER and it fails. I’ll follow up with the latest JAMF logs.

To Reproduce
Steps to reproduce the behavior:

  1. Run DEPNotify on enrollment
  2. Add a homebrew script as a policy
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Logs
Please attach the following logs:

  • /var/tmp/depnotify.log
  • /var/tmp/depNotifyDebug.log
  • /var/log/jamf.log

Software Versions (please complete the following information):

  • macOS Version [e.g. 10.14.0]
  • Jamf Version [e.g. 10.7.1]
  • DEP Notify Version [e.g. 1.1.0]

Additional context
Add any other context about the problem here.

Python is used in script

Describe the bug
The script generated by Set-Up Helper uses python to set the CURRENT_USER variable

To Reproduce
Steps to reproduce the behavior:

  1. Open DEPNotify Set-Up Helper
  2. Generate script
  3. Open script and search for 'python'
  4. See error:
    /usr/bin/python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "\n");'

Software Versions (please complete the following information):
Python is deprecated in macOS >12.3

Issue with depNotify.sh

Hello,

I created a launchagent to kick off the depNotify.sh on login and it does launch it, the problem is, whether the test flag is true or false, it runs through and doesn't actually trigger the policies. Can you review my script and advise on what I did wrong? I barely modified anything.

I have the shell script saved on a web server and i have it downloaded to the computer via a curl command script in a policy so it can be modified on the fly without the need to constantly recreate a package. I am chmoding it 777. Any advice would really help as it worked once and then stopped working on all the machines ive tested on. Machines are running OEM 10.13.6.

depNotify.sh.zip

EULA Sample Text?

You have an example image of a EULA, but do you have the corresponding text your can share?

Re-run goes straight to Logout-message

Describe the bug
I've been doing some testing, and found that if I run it manually a second time, it goes straight to the "Logout"/"Quit" message, but all policies are still run in the background if I don't click the "Logout"-button.

I've been scanning the code, but haven't been able to find where it checks if it's already run and hence goes straight for the "Logout"-message.

To Reproduce
Steps to reproduce the behavior:

  1. Run during enrollment
  2. Don't logout when done, leaving a running terminal prevents logout.
  3. Run again, manually (i.e., in my case, jamf policy -event depnotify)
  4. DEPNotify is shown again, but immediately shows the "Logout" or "Quit" button

Expected behavior
A clear and concise description of whats needed to be able to run multiple times.

Screenshots
screenshot 2018-10-24 at 10 54 52

Logs
Please attach the following logs:
depnotify.log
depNotifyDebug.log
jamf.log

Software Versions (please complete the following information):

  • macOS Version 10.14.0
  • Jamf Version 10.7.1
  • DEP Notify Version 1.1.0

Additional context
Add any other context about the problem here.

DEPNotify has stopped working

Describe the bug
When logging in to a newly enrolled MacBook Pro, DEPNotify no longer starts as expected. When trying to start manually I get the following:

'Script result: FSPathMakeRef(/Applications/Utilities/DEPNotify.app) failed with error -43.'

I have also logged a support case at JamfNation about this: JAMF-0836154

To Reproduce
Steps to reproduce the behavior:
Freshly install 10.15.1, log in with admin user, nothing happens.

Expected behavior
I expect DEPNotify to start and start running it's script to install my other policies.

Screenshots
If applicable, add screenshots to help explain your problem.

Logs
Please attach the following logs:

sudo jamf policy -event depnotify
Password:
Checking for policies triggered by "depnotify" for user "toadmin"...
Executing Policy 02 Install DEPNotify
Downloading CME_logos.pkg...
Downloading https://euc1-jcds.services.jamfcloud.com//download/31b7f1de8e854985af9094f0e8ce0e51/CME_logos.pkg?token=33ce7612723346ddae4650ea7a59fdcbqe1tfzf4e5l4d4ul06h6qlcm8msd1p13...
Verifying package integrity...
Installing CME_logos.pkg...
Successfully installed CME_logos.pkg.
Running script Install & Run DEPNotify...
Script exit code: 1
Script result: FSPathMakeRef(/Applications/Utilities/DEPNotify.app) failed with error -43.

Error running script: return code was 1.

Software Versions (please complete the following information):

  • macOS Version: 10.15.1
  • Jamf Version: 10.17.1 (today, but same with 10.16.whatever it was before upgrade this past weekend)
  • DEP Notify Version: 2.0.0

Additional context
Add any other context about the problem here.

DEPNotify not starting until Self Service is manually Opened

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:
I have NoMAD Login configured in the Prestage enrollment, and DEPnotify triggered by enrollment complete.
After initial setup and logging in with a user account with ¬NoMAD login, the DEPNotify GUI does not start- however If I manually start the Self Service, it kicks in and runs as expected.

Expected behavior
I expect the DEPNotify GUI to run as soon as the User is logged in

Logs
Please attach the following logs:
depnotify.log
depnotifyDebug.log

Software Versions (please complete the following information):

  • macOS Version [e.g. 10.14.3

]

  • Jamf Version 10.10.1
  • DEP Notify Version 1.1.4
    screenshot 2019-03-08 at 11 08 28
    screenshot 2019-03-08 at 11 08 21

Additional context
It looks like Self Service is not starting because JAMF can't find the logged in user- is this necessary to start the DEPNotify GUI?

Here is the DEP Notify Script I am using-

dep-notify-script.txt

Thanks in advance!

Waiting for branding image from Jamf Pro

Hi,

Now that Jamf Pro 10.27 has shifted the branding image to a Jamf Pro URL your script will no longer work at present unless you change the code for the branding image accordingly.

Otherwise DEPNotify will never launch and the logs will be spammed like the below image
Screenshot 2021-01-19 at 14 51 32

I've embedded my company image into a DEPNotify1.1.6 PKG then changed lines 44 & 153

Line 44
BANNER_IMAGE_PATH="PATH TO IMAGE"

Line 153
SELF_SERVICE_CUSTOM_BRANDING=false

Some issues with the Registration Window

Hey @kbareis

I'm stressing you again… 😜
I seem to have a little bit of an issue with the latest script - 1.2.0
The registration window comes up twice: once in the beginning of the installation and once more at the end. And at the end, I have no option to close the DEPNotify window.
I'll attach some screens to better explain what I mean.

screen 1

screen 2

screen 3

screen 4

screen 5

screen 6

screen 7

depNotify-New.sh.zip

DepNotify GUI not running

Describe the bug
The DepNotify GUI doesn't start running on enrollment. It will just stay at the "Waiting for DEPNotify to start the process ID" message until I manulaly open that DEPNotify app in the utilities folder

depnotify.log
depnotifyDebug.log
jamf.log

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Logs
Please attach the following logs:

  • /var/tmp/depnotify.log
  • /var/tmp/depNotifyDebug.log
  • /var/log/jamf.log

Software Versions (please complete the following information):

  • macOS Version currently running on 10.15 but the same thing happens on 10.14
  • Jamf Version 10.14.1
  • DEP Notify Version 1.1.5

This same DEPNotify and script has been working about 2 weeks ago and it just stopped. Not sure if someone changed something on the JAMF server or what happened.

FileVault Deferred Status

At the end of the DEP script, if deferred enablement is active, the command FV_DEFERRED_STATUS=$($FDE_SETUP_BINARY status | grep "Deferred" | cut -d ' ' -f6) returns 'active.' while the script is looking for 'active' in the following if statements.

After building a Macbook from factory settings, the command to show filevault status is as follows.
'Deferred enablement appears to be active.'

The command in the script:
Line 828: FV_DEFERRED_STATUS=$($FDE_SETUP_BINARY status | grep "Deferred" | cut -d ' ' -f6)
Returns:
'active.'

I'm not sure if previously it returns 'active' but this is the results I'm seeing on macOS 13.2.1

As a result, at the end of the script, instead of asking users to log out as expected, they are receiving 'Get Started' (Line 850).

  • macOS Version 13.2.1
  • Jamf Version 10.45.0
  • DEP Notify Version 1.1.6

Registration Screen Blank

Using this default starter script and the latest version of DEPNotify on MacOS 12.6 shows a blank registration screen with no options text boxes or drop downs. Looks like an issue writing to the /Users/User/Library/Preferences/menu.nomad.DEPNotify.plist

Please increase the number of allowed text fields

Is your feature request related to a problem? Please describe.
I need 4 text fields: Computer name, User's name (first and last), User's email address, Asset tag

Describe the solution you'd like
I would like to have 4 text fields. I may not need all of them for every use case, but it's easy to remove fields if needed.

Describe alternatives you've considered
On alternative I have pursued is to prompt the user using a policy to provide their full name and email address, so that these can be added to the Mac's inventory record. I tried adding a policy to the policy array that would do this but since it uses osascript, the DEPNotify app covers up the dialog box. The script will run when the policy is triggered manually from Terminal or with a check-in trigger.

Additional context
I appreciate the work that has been done on this script and the DEPNotify app. I just think that limiting us to only 2 text fields makes using DEPNotify less useful. Thanks!

Text Fields and popups at registration not appearing

Describe the bug
When I configure the text and popups to appear at Registration "true" The window appears and "register this mac" button ok. However, the text and popup fields are not showing, only a clear white box.
I click register and it runs through stating that no entries have been made for computer name, department , building etc.
Attached screenshot of splash window
To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.
Screenshot 2019-03-26 at 18 32 19

Logs
Please attach the following logs:

  • /var/tmp/depnotify.log
  • /var/tmp/depNotifyDebug.log
  • /var/log/jamf.log

Script result: LSOpenURLsWithRole() failed for the application /Applications/Utilities/DEPNotify.app with error -54.
2019-03-26 19:18:12.607 defaults[18181:227070]
The domain/default pair of (/Users/test/Library/Preferences/menu.nomad.DEPNotifyUserInput.plist, Computer Name) does not exist
2019-03-26 19:18:22.635 defaults[18183:227161]
The domain/default pair of (/Users/test/Library/Preferences/menu.nomad.DEPNotifyUserInput.plist, Asset Tag) does not exist
2019-03-26 19:18:27.659 defaults[18186:227184]
The domain/default pair of (/Users/test/Library/Preferences/menu.nomad.DEPNotifyUserInput.plist, Building) does not exist
2019-03-26 19:18:37.686 defaults[18188:227240]
The domain/default pair of (/Users/test/Library/Preferences/menu.nomad.DEPNotifyUserInput.plist, Department) does not exist

Software Versions (please complete the following information):

  • macOS Version 10.14.4
  • Jamf Version 10.10
  • DEP Notify Version 1.1.3
  • Script Version 2.0.1 vanilla, no changes except to enable Registration

Additional context
Add any other context about the problem here.

Add DEP Notify Clean Up

Is your feature request related to a problem? Please describe.
Some folks have requested clean up of DEP Notify app and some files that live in /var/tmp. Creating this enhancement request to track community interest.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.