

- #What are the safest settings for root in bash on mac update#
- #What are the safest settings for root in bash on mac password#
- #What are the safest settings for root in bash on mac mac#
- #What are the safest settings for root in bash on mac windows#

Sudo /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder but in a limited scenario it is very useful. I fully accept the warnings other people have given here regarding running finder as root. Apparently, btw, the cp command in OSX is kinda restricted (regarding to its available options and functionality) wrt its Linux counterpart and, to add the insult to the injury, its options don't work the same (see -R, for instance). Trying to do the job from the terminal issuing a cp command didn't get my any closer to achieve it. I've tried any number of searches to no avail. I suspect that it has something to do with permissions, so I thought that doing the copying as root might help. I can mount the disk and navigate it on the finder or on a terminal but, when it comes to actually copying files (either on a terminal or on the finder), I get an error such as "Cannot read the file" or even "File does not exist". I downloaded a library (FUSE for OSX), which is able to read that file system and a complementary app (ext4fuse), which works as a client interface to FUSE. I've got a brand new iMac running Yosemite and I do need to access an external HD formatted on (Gnu/Linux) ext4 (a journaling file system). Every so often I just add new bits and pieces to this script as required.įreelance System Administrator and DevOps Engineer based in London, UK with 25 years of server, infrastructure and automation experience.I'm back some twenty years after my last Mac. If thenĬd /Users/$user/Library/Application Support/FirefoxĬd $(grep "Path=" profiles.ini | awk -F '=' '')Įcho "user_pref("", 5) " > user.jsĪnd that’s it. # tell firefox to use system proxy settings Su - $user -c "defaults -currentHost write idleTime -int 900" Su - $user -c "defaults -currentHost write askForPassword -int 1"
#What are the safest settings for root in bash on mac password#
# turn on screen saver with password for security Su - $user -c "/usr/sbin/softwareupdate -schedule off > /dev/null"
#What are the safest settings for root in bash on mac update#
# turn off software update prompts as they're pointless for non-admin users

Xattr -d "$app" &> /dev/nullįor user in $(ls /Users | egrep -v ".*|Deleted Users|Guest|Shared|administrator") # turn off annoying 'this app was downloaded from the internet.' promptsįind /Applications -maxdepth 1 -mindepth 1 -name "*.app" | while read app do Interface=$(/usr/sbin/networksetup -listallnetworkservices | grep -i airport) To make sure the settings I want are set up and retained on users’ Macs, I have a script deployed on all our Macs which runs as root a couple of times each day: #!/bin/bash
#What are the safest settings for root in bash on mac windows#
However, one of the wonderful things about having an office environment consisting entirely of Macs (rather than Windows PCs) is that you can just SSH into them and write Bash scripts which can be triggered by cron (or, better still, by launchd.
#What are the safest settings for root in bash on mac mac#
Although I’ve got our Mac mini server nicely set up now, there are occasionally things I want to do on users’ Macs which can’t be done or don’t work properly via Server Admin and Workgroup Manager.
