jamf / depnotify-starter Goto Github PK
View Code? Open in Web Editor NEWBash script to start DEPNotify and run policies during enrollment with Jamf Pro
Home Page: https://gitlab.com/Mactroll/DEPNotify
License: MIT License
Bash script to start DEPNotify and run policies during enrollment with Jamf Pro
Home Page: https://gitlab.com/Mactroll/DEPNotify
License: MIT License
Sorry, I am not Request any bug,
I just want to ask some question about force the user to enter the register contents
Thanks
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
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:
Software Versions (please complete the following information):
Additional context
Add any other context about the problem here.
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 ...
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:
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:
Software Versions (please complete the following information):
Additional context
Add any other context about the problem here.
You have an example image of a EULA, but do you have the corresponding text your can share?
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.
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:
Software Versions (please complete the following information):
Python is deprecated in macOS >12.3
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
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
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).
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?
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
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.
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):
]
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-
Thanks in advance!
As stated in the subject line: Could we have the option to reboot at the end instead of just a logout?
Is your feature request related to a problem? Please describe.
Jamf Pro v 10.9 added the ability to deploy 1 app during DEP enrollment. Need to test and verify any changes to documented workflow(s)
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:
Software Versions (please complete the following information):
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.
Just wondering if the registration portion of the script works for others. I had 6 M1 laptops recently run V2.01 of the script and the names in jamf did not update is why I ask?
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):
Additional context
Add any other context about the problem here.
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:
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.
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:
Any need for the following?
Ones I wasn't planning to add
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:
Expected behavior
A clear and concise description of whats needed to be able to run multiple times.
Logs
Please attach the following logs:
depnotify.log
depNotifyDebug.log
jamf.log
Software Versions (please complete the following information):
Additional context
Add any other context about the problem here.
I'm currently using this as my script:
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
My issue & workflow is very much like a prior ticket you had resolved... #3
But instead I am using the latest version and fixes... Any update to this issue?
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:
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:
Software Versions (please complete the following information):
Additional context
Add any other context about the problem here.
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?
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. 😕
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.
Ideas
true
/false
options as configurable items, thanks @sepiemoiniHello,
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.
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).
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:
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:
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):
Additional context
Add any other context about the problem here.
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"
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:
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:
Software Versions (please complete the following information):
Additional context
Add any other context about the problem here.
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.
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!"
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:
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):
Additional context
Add any other context about the problem here.
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.