Show of your self service

RaulSantos
Contributor

I been wondering what kind of things people offer on there self cerise. Show off screenshots and list what you offer.

65 REPLIES 65

RaulSantos
Contributor

external image link

spraguga
Contributor

@bentoms What's your Webex Install Fix doing? Our clients are constantly receiving Webex issues when trying to connect to meetings.

Thanks! ;)

ooshnoo
Valued Contributor

@jacob_salmela
Hey man.. What is the syntax of the command you have to remove WiFi network from list of preferred networks?

-A

jacob_salmela
Contributor II

For the Self Service version of this script, I use this.

ooshnoo
Valued Contributor

@jacob_salmela

Thank you sir. Aside from the undesiredNetwork="" variable, are there any other in the script I need to change, as when I add an SSID into that variable, the newtork is not removed from the list???

ImAMacGuy
Valued Contributor II

@jacob_salmela If I'm reading your script right, how do you account for the multitude of hotel SSIDs and stuff? Wouldn't it be better to have the desiredSSID(s) and remove the rest? Or is that what it's actually doing and I just can't read a script? (which is entirely possible)

I've seen people's machines that have tons of SSIDs if they travel frequently, and each unique one would be too many to guess.. not to mention hotspots and such

stevewood
Honored Contributor II
Honored Contributor II

@ooshnoo I recently had to setup a policy to run through and remove a network from our machines. This was the script I used:

#!/bin/sh

wifiPort=`networksetup -listallhardwareports | awk '/Hardware Port: Wi-Fi/,/Ethernet/' | awk 'NR==2' | cut -d " " -f 2`

networksetup -removepreferredwirelessnetwork $wifiPort "Integer Public"

ooshnoo
Valued Contributor

@stevewood

Perfect sir. Worked just fine. Thank you!

jacob_salmela
Contributor II

@ooshnoo Oops. I had some syntax problems. I fixed them on that link now. If your SSID has whitespace in it, it might not work. I recall having trouble with that when originally making it...

jacob_salmela
Contributor II

@jwojda
I'm not the best script-writer, but I'm only removing the undesired SSID and not touching the other ones.

Aaron
Contributor II

jonnydford
Contributor II

@Aaron Could you share your Outlook signature script?

ImAMacGuy
Valued Contributor II

Aaron - Can you post your recreate outlook profile script as well?

BrysonTyrrell
Contributor II

I might as well jump in and share too.

external image link

emily
Valued Contributor III
Valued Contributor III

Aaron
Contributor II

@jonnydford - We have an AD environment, but I use "dscl" to pull the data, so it should work with OD as well. You may need to tweak it a bit depending on your environment. I haven't found a way to embed the images actually into the signature, so it relies on an external link.

#!/bin/sh

USERNAME=`stat -f%Su /dev/console`

FIRSTNAME=`dscl . -read "/Users/$USERNAME" FirstName | cut -d':' -f2 | xargs`
LASTNAME=`dscl . -read "/Users/$USERNAME" LastName | cut -d':' -f2 | xargs`
JOBTITLE=`dscl . -read "/Users/$USERNAME" JobTitle | cut -d':' -f2 | xargs`
PHONENUM=`dscl . -read "/Users/$USERNAME" PhoneNumber | cut -d':' -f2 | xargs`
EMAIL=`dscl . -read "/Users/$USERNAME" EMailAddress | cut -d':' -f2 | xargs`

if [[ $a != 9656* ]]; then
    PHONENUM=`echo "9656 $PHONENUM"`
fi
PHONENUM=`echo "+61 3 $PHONENUM"`

HTML="
<br/>
$FIRSTNAME $LASTNAME<br/>
$JOBTITLE<br/>
Peter MacCallum Cancer Centre<br/>
<a href='http://www.petermac.org'>http://www.petermac.org</a><br/>
<br/>
Phone: $PHONENUM<br/>
<a href='mailto:$EMAIL'>$EMAIL</a><br/>
<img height=58 width=135 src='http://petermac.org/sites/all/themes/petermac_new/logo.png'><br/>
<a href='https://twitter.com/petermac_news'><img height=25 width=150 src='http://petermac.org/sites/default/files/twitter-button.jpg'><br/>
"

osascript <<EOD
tell application "Microsoft Outlook"
    make new signature with properties {name:"$FIRSTNAME $LASTNAME", content:"$HTML"}
end tell

tell application "Microsoft Outlook" to activate
tell application "System Events"
    click menu item "Preferences..." of menu 1 of menu bar item "Outlook" of menu bar 1 of application process "Outlook"
    click item 1 of (buttons of window "Outlook Preferences" of application process "Outlook" whose description is "Signatures")
    select last item of (rows of table 1 of scroll area 2 of window "Signatures" of application process "Outlook")
end tell
EOD

What I do at the end is get Outlook to display the signature to the user to check for errors. We try to be diligent with our data entry, but sometimes bits are missing or incorrect in our AD. It produces something that looks like this:

external image link

@jwojda - My method is a bit of a scorched earth approach, but I find it works well. There's probably a better method, and I'm open to suggestions. Mine in particular relies on the presence of the MUD folder in the User Templates as it has some pre-configured bits, but you could tweak it as necessary. It's actually quite simple:

#!/bin/bash

USER=`stat -f%Su /dev/console`

if (ps aux | grep [M]icrosoft >/dev/null); then
    a=$(osascript -e 'tell application "System Events" to activate' -e 'tell application "System Events" to set question to display dialog "In order to continue, all Office applications will be closed. Are you sure you want to continue?" buttons {"Yes", "No"} default button 2 with icon caution' -e 'button returned of question')
    if [ "$a" == "No" ]; then
        exit 0
    fi
fi

# Kill all Office processes cleanly
killall -HUP "Microsoft Excel"
killall -HUP "Microsoft Word"
killall -HUP "Microsoft PowerPoint"
killall -HUP "Microsoft Outlook"
killall -HUP "Microsoft Database Daemon"
killall -HUP "Microsoft AU Daemon"

# Wait while processes are cleaning up
while (ps aux | grep [M]icrosoft >/dev/null)
do
    sleep 1
done

# Rename old folder
mv "/Users/$USER/Documents/Microsoft User Data" "/Users/$USER/Documents/Microsoft User Data.$(date +%Y%m%d%H%M%S)"

# Recreate from template
cp -R /System/Library/User Template/English.lproj/Documents/Microsoft User Data "/Users/$USER/Documents/"
chown -R "$USER:PMCIDomain Users" "/Users/$USER/Documents/Microsoft User Data"

# Run Outlook to complete setup
sudo -u "$USER" /Applications/Microsoft Office 2011/Microsoft Outlook.app/Contents/MacOS/Microsoft Outlook &

pblake
Contributor III

Thanks @RaulSantos for creating this thread!

Hey @jacob_salmela any chance you could share your code for "Refresh Connection with Management Servers"?

Hey @franton any chance you could share you rebuild spotlight index code that works with 10.9.x?

Hey @krichterjr any chance you could chafe your update keychain password code?

Or if anyone else has code for these and can share it, great!

Thanks @Aaron for the outlook scripts.

jacob_salmela
Contributor II

@pblake I just run a Recon for my "Refresh connection" task. I find that if a client hasn't checked in, it will work when the user forces it via Self Service.

ruschg
New Contributor II

@rlandgraf - This may be a blast from the past, but what is running in the background when running the following policies from your Self Service above?
1) "Update Inventory" - I assume this is tied to Recon?
2) "Computer Info"

Much appreciated!

Tophernad
New Contributor II

I'm working on Self Service. This thread has been pretty helpful. Are the categories that you have listed the categories that they are in your JSS?

Look
Valued Contributor III

Ys the catergories in the JSS are the same ones in Self Service and it automatically creates and displays any that have valid Self Service policies for the current user.

chris_miller
Contributor

b8d29f1456c647a8b35859f99920dee2
Here's mine. Kind of getting started. All our teachers are migrating to Macs this spring. So I'm keeping things pretty simple for them.

Retrac
Contributor

98cb701f32ce4eed96cba8bbf54e58e5
Made a few CSS changes with some custom background images. Sure it will all change with JAMFPro 9.10 but since 9.8 has worked a treat.

niacobelli
New Contributor III

I'm pretty sure I know this answer already, but is it possible to nest Self Service plug ins?

smvasallo
New Contributor II

@ Retrac How did you go about customizing self service?

Retrac
Contributor

I found the CSS file that was being used and changed a few div containers to have a bg image or changed the bg colour and text colour. took off a rounded corner in places too. There are only 2 new images, the background and the main div across the top.

This is the file I changed (JSS 9.98 on CentOS 7)
/usr/local/jss/tomcat/webapps/ROOT/stylesheets/osxselfservice/landingPage.css
I uploaded the new images here
/usr/local/jss/tomcat/webapps/ROOT/ui/images/selfservice2/new/

Obviously a complete hack and sure JAMF would not approve lol.

JamfPro 10 has Self Service branding so hopefully won't need to be going this route again.