Sudo -u $3 /usr/local/bin/dockutil -add '/Applications/Microsoft Office 2011/Microsoft Excel.app' "/Users/$3" Sudo -u $3 /usr/local/bin/dockutil -add '/Applications/Microsoft Office 2011/Microsoft Word.app' "/Users/$3" Sudo -u $3 /usr/local/bin/dockutil -add '/Applications/Safari.app' "/Users/$3" Sudo -u $3 /usr/local/bin/dockutil -add '/Applications/Launchpad.app' "/Users/$3" Sudo -u $3 /usr/local/bin/dockutil -remove all "/Users/$3" # Apply the dockutil settings to current logging in user $3 Go to "Computer Management Framework Settings" > Login/Logout Hooks > Untick "Perform login actions in background" if it is ticked. $3 method works reliably with "Perform login actions in background" unticked but not when ticked. If anyone could tell me where I'm going wrong or can offer some help I'd appreciate it. usr/bin/sudo -u $User /usr/local/bin/dockutil -add /Applications/Self Service.app -after 'OIT IP Helper' -no-restart -allhomes usr/bin/sudo -u $User /usr/local/bin/dockutil -add /Applications/OIT IP Helper.app -position beginning -no-restart -allhomes usr/bin/sudo -u $User /usr/local/bin/dockutil -remove 'Mail' -no-restart -allhomes User= /bin/ls -l /dev/console | /usr/bin/awk ''
OS X SHELL SCRIPT TO REMOVE ITEMS FROM DOCK MANUAL
I understand this could be due to login policy wanting to run as the service account for JSS but when I attempt to run it as a user I run the following and it fails both at login or with manual trigger. When I run the same script with a login trigger it does not work, but it runs. usr/bin/sudo /usr/local/bin/dockutil -add /Applications/Self Service.app -after 'OIT IP Helper' -no-restart -allhomes usr/bin/sudo /usr/local/bin/dockutil -add /Applications/OIT IP Helper.app -position beginning -no-restart -allhomes usr/bin/sudo /usr/local/bin/dockutil -remove 'Mail' -no-restart -allhomes # Script to add and remove items from dock using dockutil. I am able to get the following script to run successfully via policy with a manual trigger. I'm looking to apply a few dock items using dockutil at login once per user per machine.
OS X SHELL SCRIPT TO REMOVE ITEMS FROM DOCK FULL
Write a shell script that reverse the order of lines in the file and replaces spaces with full stop.I'm new to Casper and new to scripting.Write a shell script to count and report the number of entries present in each sub-directory mentioned in the path which is supplied as command-line argument.If permissions are same, concatenate both the files in a third file, otherwise display a message “Both files have different permissions” Write a shell script that takes two file names from command line and checks the permissions on both the files.Write a shell script to change the suffix of all your *.txt files to. Write a shell script to find a given date fall on a weekday or a weekend.Write a shell script to make the following operations menu based:Ī) Addition b) Subtraction c) Multiplication d) Division Write a shell script to print contents of file from given line no.Combine Emp1 and Emp2 in file Emp3 horizontally and vertically.Write a shell script to remove all the zero sized files from the current directory.Write a script that constitutes a file by the last three lines of every file specified in the command line arguments.Write a shell script to obtain the effect of COPY CON in DOS.If total values entered through command line argument are more than 5 print “Invalid number of arguments”. Write a shell script to print all the values which are passed by command line argument in reverse way.Write a shell script to find the sum of digits of a number entered through command line argument and find whether sum is even or not.Write a shell script to find the sum of n numbers which are passed by command line argument.Write a shell script to generate a multiplication table.Write a shell script to check whether a given no.Write a shell script to find the sum of first n numbers.Write a shell script to find whether a given year (4 digits) is leap year or not.Write a shell script to find the largest of three numbers and also find the total and average.Write a shell script to find the factorial of a given no.