I am new to Mac and Jamf.
When our MacBooks were imaged the Spotlight stopped working. I found the problem is i need to remove a file from the root named .metedata_never_index and restart the indexer
I am attempting to wright a script to use with the self service portal. If they have the problem they can just run it from there.
Script
#!/bin/sh
#
sudo rm /.metedata_never_index
sudo mdutil -i on /
Script end
I think i need to run this as root, this is why i used sudo command but it asks for password and if i run it from self service it dose not prompt me for password. I have a hidden account on all the mac's named tech that is an admin account, can i use that account to run under or can i just have the user be prompted for there password.
Is this the best way to do this?