Hi all
Can I integrate the 'sign-in helper' with the office configuration profile? ... so once the user signs in.... everything will be implemented.
Not sure what the 'sign-in helper' is.
This shell script will populate the MeContact.plist information for a user from Active Directory. This is the information displayed in Excel, PowerPoint and Word when choosing Preferences > User Information.
https://gist.github.com/58f126bf3b6aab2a1471f23cbef74f4e
@talkingmoose thank you. I will try this route.
@talkingmoose On a unrelated note- is there a way that when a user launches outlook - it defaults to exchange account?
The first account added to Outlook becomes the default account. However, if the user has other Exchange or IMAP accounts, messages will send from the account that's currently selected (clicked into). That's Outlook's behavior and can't be changed.
@talkingmoose Thank you
@talkingmoose Why is that when i try run the script from github into my terminal for (testing purposes), it says its 'setting' everything - but when I launch Word User Info.......nothing is populated?
what am I doing wrong?
@vferra, are you running the script without any of the Office apps running?
@talkingmoose no... i close everything - run the script - wait 5 minutes - then open MS Word.. I also got a success when being pushed thru CASPER
I must be doing something wrong....
is it cuase we are still running on JAMF 9.100?
Hmm...
Run these three lines in Terminal one at at time:
currentUser=$( /usr/bin/stat -f "%Su" /dev/console )
currentUserHome=$( /usr/bin/dscl . read "/Users/$currentUser" NFSHomeDirectory | /usr/bin/awk 'BEGIN {FS=": "} {print $2}' )
meContact="$currentUserHome/Library/Group Containers/UBF8T346G9.Office/MeContact.plist"
echo "$meContact"
What do you get after running the last command? It should look something like:
/Users/talkingmoose/Library/Group Containers/UBF8T346G9.Office/MeContact.plist
yup
i get that
Based on your policy log, looks like the policy is running as a-vferra, but setting the information for vferra. Are you currently viewing the vferra account?
@talkingmoose I think its the JSS version we are on...we are not up to date.... we are still running on 9.100.
This may explain why some things work and others do not. I'm pretty sure all the scripts and everything you gave me work, but the reaxon they are not working for me is cause the version mismatch.
The user info script works perfect cause when I pushed it to 2 test machines - it worked
but when I try other test machines.... nothing happens - and this sort of 'ON & OFF' thing happens with other aqpps
We are updating to JAMF Pro in a few weeks.
Ill keep you posted if I need any help on other stuff.
thank you for everything in teaching me
@talkingmoose hope all is well ......
If I run your 'MS Word user info' script locally thru my terminal...shouldnt it work and input the fields in MS Word?
I am also using a script program called 'CodeRunner' to test out my scripts.
I am also on the newest 16.14.1 office suite.
is there something im doing wrong?
@vferra, you're not giving me much to go on. Yes, it should work.
The script gives you feedback telling you what it's doing each step of the way. As it runs, it should tell you:
Currently logged in user: <your username>.
Currently logged in user's home folder path: <path to your home folder>.
NetBIOS Domain: <your DOMAIN>.
Setting Address: <your address if populated in AD>
Setting Company: <your company name if populated in AD>
And more as it proceeds.
Where is it failing?
@talkingmoose Sorry about that...I attached a photo of what the output looks like when i run the script in coderunner
Suggestions?
@vferra You will need to run /usr/bin/defaults writes... with sudo if running with coderunner.
You shouldn't need to use sudo at all if running this command while logged as the current user. You only need sudo if you're changing something on your computer that the current account doesn't have privileges to change. The current account has full privileges over its own home folder.
In fact, if you run this command using sudo and the file doesn't exist already, it will be owned by root and probably inaccessible to the current user.
What result does listing ownership and permissions reveal?
/bin/ls -hal "/Users/vferra/Library/Group Containers/UBF8T346G9.Office/MeContact.plist"
It should be:
-rw------- 1 vferra staff
@talkingmoose Thanks for the correction. I should of put more thought into this. Was just a quick response from me thinking that JSS runs scripts with root privilege vs terminal / coderunner as logged in user.
@talkingmoose correct.. i get this:
-rw------- 1 vferra PVHCORPDomain Users 268B Jun 27 13:21 /Users/vferra/Library/Group Containers/UBF8T346G9.Office/MeContact.plist
@vferra, at this point I'm at a loss as to why you can't write to that file.
All the other commands to gather information about the user and from Active Directory appear to be working just fine. For some reason, the script doesn't like writing either to that MeContact.plist file or somewhere along the path to that file.
I was able to recreate the error message from your screenshot, but only by changing ownership to the file and denying my account access to it. Somewhere, you have a permissions issue.
@talkingmoose
hmmm....I believe you are correct
Thank you for all your help.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.