I'm running an Ubuntu LTSP setup at a school with about 60 unique users. Occasionally, we need to share a document, create a directory or place a config file in every user's account. Obviously, it's not efficient to do this one at a time.
I know I can place a file in every user's home directory with:
ls /home/ | xargs -n 1 sudo cp -i <file>
But what if I need to put it somewhere specific, such as ~/.config/autostart?
Or what if I need to create the directory ~/Desktop/foo/ for every user?
Thanks for your help, and if anyone can suggest resources for me to learn more that would be awesome.
/etc/xdg/autostartto run a single script, centrally managed. The script will then run locally for each and every user that logs in. You can make the script do anything, and there will be no permnission issues, since the script then runs as a process from the local user. – Jacob Vlijm Jun 19 '15 at 16:21