1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
#!/bin/sh usr="$1" mkdir "/home/informatics/jails/$usr" mkdir "/home/informatics/jails/$usr/home" mkdir "/home/informatics/jails/$usr/home/$usr" for f in `cd /home/informatics/config/jail; find . -print` do if [ -d "$f" ] then mkdir "jails/$usr/$f" else ln "$f" "jails/$usr/$f" fi done chown -R "$usr" "jails/$usr" chgrp -R `id -g "$usr"` "jails/$usr" |