Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

PileOfMac

macrumors newbie
Original poster
Oct 21, 2015
5
0
UK
Hi Everyone,

First time posting! I'm having some issues with OS X Profile Manager, whenever I try to upload a script via the web interface to run on login it tells me the file type is not supported even though its a shell script created on a mac. Any help would be really appreciated as Apple are wasting my time! Thanks in advance :)
 

Attachments

  • PM Error.PNG
    PM Error.PNG
    12.6 KB · Views: 461

chrfr

macrumors G5
Jul 11, 2009
13,709
7,280
Hi Everyone,

First time posting! I'm having some issues with OS X Profile Manager, whenever I try to upload a script via the web interface to run on login it tells me the file type is not supported even though its a shell script created on a mac. Any help would be really appreciated as Apple are wasting my time! Thanks in advance :)
Profile Manager is giving you an accurate warning. What file are you trying to upload, and to where?
What are you trying to do?
 

PileOfMac

macrumors newbie
Original poster
Oct 21, 2015
5
0
UK
Profile Manager is giving you an accurate warning. What file are you trying to upload, and to where?
What are you trying to do?

Thanks for the reply chrfr! Basically I want rsync to run on login to copy the users desktop and documents to a network share, I was attempting to this through a shell script that runs on login. I can get it to work if I set it locally on each mac but I want to be able to manage this centrally as we have over 30+ macs. Any suggestions?

Thanks!
 

chrfr

macrumors G5
Jul 11, 2009
13,709
7,280
Thanks for the reply chrfr! Basically I want rsync to run on login to copy the users desktop and documents to a network share, I was attempting to this through a shell script that runs on login. I can get it to work if I set it locally on each mac but I want to be able to manage this centrally as we have over 30+ macs. Any suggestions?

Thanks!
What's your script, exactly? Is it saved as a plain text file with .sh as the extension? I assume you are trying to load it into the Loginwindow settings, under login scripts? I don't know that will work there; putting a LaunchAgent on each client computer is probably a better solution for this.
 

PileOfMac

macrumors newbie
Original poster
Oct 21, 2015
5
0
UK
What's your script, exactly? Is it saved as a plain text file with .sh as the extension? I assume you are trying to load it into the Loginwindow settings, under login scripts? I don't know that will work there; putting a LaunchAgent on each client computer is probably a better solution for this.

This is the script =

#!/bin/bash
# RSYNC Backup

rsync -aE --delete ~/Documents/ /volumes/users$/$USER/macdocs/
rsync -aE --delete ~/Desktop/ /volumes/users$/$USER/macdesktop/

It was plain text until I made it an executable? (using chmod +x) It might be the case I have to set them all individually but life would be a lot easier if I can centrally deploy this script. I appreciate you taking time out your day to help me with my problem!
 

chrfr

macrumors G5
Jul 11, 2009
13,709
7,280
This is the script =

#!/bin/bash
# RSYNC Backup

rsync -aE --delete ~/Documents/ /volumes/users$/$USER/macdocs/
rsync -aE --delete ~/Desktop/ /volumes/users$/$USER/macdesktop/

It was plain text until I made it an executable? (using chmod +x) It might be the case I have to set them all individually but life would be a lot easier if I can centrally deploy this script. I appreciate you taking time out your day to help me with my problem!
Uploading that works for me, but your script has issues. There's no directory on the Mac called "volumes". Case sensitivity is important. Dollar signs in scripts indicate variables, so you can't use them in your path as they exist here.
 

DJLC

macrumors 6502a
Jul 17, 2005
959
404
North Carolina
You know you can set up this functionality with Mobile Accounts and the built-in home sync, right? Those options can be managed from Profile Manager. Pretty easy assuming everyone has a network home defined in OD or AD, automatically keeps the whole home folder (or selected parts of it) synced between client and server.
 

PileOfMac

macrumors newbie
Original poster
Oct 21, 2015
5
0
UK
What did you upload it to? The volume is a windows network share that auto mounts. I've found the script works fine!
 

PileOfMac

macrumors newbie
Original poster
Oct 21, 2015
5
0
UK
You know you can set up this functionality with Mobile Accounts and the built-in home sync, right? Those options can be managed from Profile Manager. Pretty easy assuming everyone has a network home defined in OD or AD, automatically keeps the whole home folder (or selected parts of it) synced between client and server.

John Mairs - I didn't know that! You Sir have made my day. Thanks for your help guys!
 

mmilon

macrumors newbie
Nov 19, 2015
2
0
Apologies for hijacking the thread but i am trying to do something similar without using Mobile Accounts. Anyone know if it is possible to use symlinks to just redirect the "Documents" and "Desktop" folder to the network Home Folder and whether it is possible to deploy using profile manager. If so how would i go about writing the script.

At the moment i have 24 MacBooks bound to a Mac Server however the macbooks grind to a halt because from what i have read the ~Library folder is located on the Network Share, hence me wanting to just redirect the above folders so that it doesn't matter which macbook a user logs on to they still have access to their documents and desktop.
 

DJLC

macrumors 6502a
Jul 17, 2005
959
404
North Carolina
Apologies for hijacking the thread but i am trying to do something similar without using Mobile Accounts. Anyone know if it is possible to use symlinks to just redirect the "Documents" and "Desktop" folder to the network Home Folder and whether it is possible to deploy using profile manager. If so how would i go about writing the script.

At the moment i have 24 MacBooks bound to a Mac Server however the macbooks grind to a halt because from what i have read the ~Library folder is located on the Network Share, hence me wanting to just redirect the above folders so that it doesn't matter which macbook a user logs on to they still have access to their documents and desktop.

So I would reply the same as I did before; I'd advise using a Mobile Account and enabling the Home Sync settings. You can include or exclude whichever folders you wish. So in your case, you could have it auto-sync Desktop and Documents at login and logout and exclude ~/Library.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.