Hey all!
I'd like to have an alias that points to Self Service available on the desktop of all Macs across our fleet.
I guess there are several ways of doing this. Just looking to get some ideas on what a quick and easy method would be.
Thanks!
Hey all!
I'd like to have an alias that points to Self Service available on the desktop of all Macs across our fleet.
I guess there are several ways of doing this. Just looking to get some ideas on what a quick and easy method would be.
Thanks!
@SteveWalker . You can test and try.
For currently logged in user
loggedinuser=$( echo "show State:/Users/ConsoleUser" | scutil | awk '/Name
&& ! /loginwindow/ { print $3 }' )
cp -R "/Users/Shared/IBM/IBM i Access" /Users/$loggedinuser/Desktop/
For all users
Exsiting Users
for userLogged in $(/bin/ls /Users | sed -e '/Shared/d' -e '/Deleted Users/d' -e '/.localized/d'
-e '/.DS_Store/d' -e '/.com.apple.timemachine.supported/d' -e '/Adobe/d' -e '/Library/d');
do
ln -s /Applications/Self\\ Service.app /Users/$userLogged/Desktop/SelfService
chown -R $userLogged:staff /Users/$userLogged/Desktop/SelfService
done
Future Users
ln -s /Applications/Self\\ Service.app /System/Library/User\\ Template/English.lproj/Desktop/SelfService
/usr/sbin/chown -R root:wheel /System/Library/User\\ Template/English.lproj/Desktop/SelfService
Thanks
I simply made a policy to do this. Added under "Files and Processes":
ln -s /Applications/Self\\ Service.app ~/Desktop
I simply made a policy to do this. Added under "Files and Processes":
ln -s /Applications/Self\\ Service.app ~/Desktop
I thought Files and Processes ran as root user, but you're saying ~/Desktop still points to the currently logged in user's desktop?
I thought Files and Processes ran as root user, but you're saying ~/Desktop still points to the currently logged in user's desktop?
I made a policy real quick after reading this and it works fine... literally took a couple minutes, so try it!
It didn't work for me. The logs tell me it has completed but there is no Alias on the desktop.
I think @piotrr may be correct and the command is running as root user, as the logs show this:
Executing Policy Self Service Alias
Running command ln -s /Applications/Self\\ Service.app ~/Desktop...
Result of command:
ln: /var/root/Desktop/Self Service.app: File exists
I went with this in the end: created a script and got the policy to deploy it. The script contents being:
#!/bin/sh
sudo -u $3 ln -s /Applications/Self\\ Service.app /users/$3/Desktop
The key thing here being the $3 parameter, which Jamf defines as the current logged on user.
Thanks for the assistance, jamfers!
It didn't work for me. The logs tell me it has completed but there is no Alias on the desktop.
I think @piotrr may be correct and the command is running as root user, as the logs show this:
Executing Policy Self Service Alias
Running command ln -s /Applications/Self\\ Service.app ~/Desktop...
Result of command:
ln: /var/root/Desktop/Self Service.app: File exists
Well, it is working here, and based on the log entry above, there's already one on the desktop, hence it failed.
I saw the same if I re-ran it as-is, so not sure why I can use it here and you can't. I honestly thought it would not work for the reason above, but it does... ¯\\_(ツ)_/¯
Either way, glad you got it sorted...👍
Well, it is working here, and based on the log entry above, there's already one on the desktop, hence it failed.
I saw the same if I re-ran it as-is, so not sure why I can use it here and you can't. I honestly thought it would not work for the reason above, but it does... ¯\\_(ツ)_/¯
Either way, glad you got it sorted...👍
Maybe because I'm using an AD account to login to my Mac? Not sure myself.
Like you say, at least it's sorted... and for anyone looking at this article in future, there's a couple of tried-and-tested options to try!
Thanks for the assist, I wouldn't have known where to begin otherwise.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.