This is what I came up with:
It also uses http://magervalp.github.io/CreateUserPkg/
#!/bin/bash
# This script will first check existing accounts for presence of USERNAME or admin or administrator
# If found, it will change the password to PASSWORD
# If none are found, it will run the package create_USERNAME-1.0.pkg which creates an account with Full Name = Administrator, Account Name
# (short name) USERNAME with the password.
function checkusername () {
local test1=$(dscl . -list /Users | grep -i USERNAME)
local test2=$(dscl . -list /Users | grep -i admin)
local test3=$(dscl . -list /Users | grep -i Administrator)
if [ "$test1" = “username” ]; then
echo the username username already exists
echo setting password
dscl . passwd /Users/username PASSWORD
exit
else
echo
fi
if [ "$test1" = "Username" ]; then
echo the username Username already exists
echo setting password
dscl . passwd /Users/Username PASSWORD
exit
else
echo
fi
if [ "$test1" = “UserName” ]; then
echo the username UserName already exists
echo setting password
dscl . passwd /Users/UserName PASSWORD
exit
else
echo
fi
if [ "$test2" = "admin" ]; then
echo the username admin already exists
echo setting password
dscl . passwd /Users/admin PASSWORD
exit
else
echo
fi
if [ "$test2" = "Admin" ]; then
echo the username Admin already exists
echo setting password
dscl . passwd /Users/Admin PASSWORD
exit
else
echo
fi
if [ "$test3" = "Administrator" ]; then
echo the username Administrator already exists
echo setting password
dscl . passwd /Users/Administrator PASSWORD
exit
else
echo
fi
if [ "$test3" = "administrator" ]; then
echo the username administrator already exists
echo setting password
dscl . passwd /Users/administrator PASSWORD
exit
else
echo
fi
}
checkusername
/usr/sbin/installer -pkg 'create_USERNAME-1.0.pkg' -target /
First of all you may need to unhide the hiden files so open terminal and run those commands :
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
To switch back, do the same but substitute FALSE for TRUE.
Now
Login to your guest account, there set chrome as your default browser (or even Firefox)
Then do not logout ! This would erase your session, so use the on the top right corner use the swich user drop down menue,
Now that you are back again in your Admin account,
Find the new temporary guest home folder, under
Users/Guest
Select all the folders inside of it,
And copy them in :
/System/Library/User Template/English.lproj/
English or whatever your languish is if you are using your computer in french this should be :
/System/Library/User Template/French.lproj/
as you can see in this folder there was the defaults folders for the guest account
By modifying them you have just modified default appearance of the guest user account
You may want to save this folder in a safe place before, in case you want to undo your work.
For reference ,
You just have to follow the steps as shown in this video :
https://www.youtube.com/watch?v=JU-W2-_c5bA
Or if you prefer text version :
http://www.michaelsmac.com/modules.php?name=News&file=article&sid=394
Best Answer
Without further changes an admin can't read the content of the default folders of another admin - except the Public folder. Any custom file or folder (e.g. a dev folder in the user folder) can be read though - provided the default umask (022) hasn't been modified previously.
Any admin can either reset the password of another admin or change the permissions of the other admin's folders with
sudo chmod ...
though and he/she will be able to access those "protected" files and folders then.Adding an additional admin makes your files vulnerable to him/her eventually.