Server Account?

I have been trying to solve a teething problem recently, and that is to create a jailed user environment without the ability to do anything (write files) even in it’s own home directory. So I tried making a shell which would provide minimal functionality, which seems to be the way to go. But then after a few tests, I found out that the user could skip the initialization of that shell, rendering it useless and the user with the ability to rapidly screw up the entire computer.

Then I tried making something like a chjail or chroot environment, and came across this jailkit¬†website which basically offers a jailed shell, but I was too lazy to follow the instructions. So I practically created something like a “slave” user, by creating a new Sharing account (on a Mac) and then by changing the properties, as you can see:

Image

Created the Users/Home directory using superuser privileges (i.e. sudo). And everything went alright, I would say. Although now I have to manually push my files into the server account, it’s still okay as I could initialize tons of servers onboard that account while the main one remains uncluttered. I even created a primitive and rather, fancy .tcshrc to keep track of my important packages:

echo "$version"
echo "Installed Packages: "
printf "  "
ssh -V
printf "  "
ruby --version
printf "  "
python --version
printf "  "
git --version
printf "  "
irb --version
printf "  "
rake --version
printf "  "
printf "gem: "
gem --version
printf "  "
sudo -V
printf "\n"
set prompt="[%m:%~] %B%n%b%# "