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 "/home/informatics/config/jail/$f" ]
then
mkdir "/home/informatics/jails/$usr/$f"
else
ln "/home/informatics/config/jail/$f" "/home/informatics/jails/$usr/$f"
fi
done
chown -R "$usr" "jails/$usr"
chgrp -R `id -g "$usr"` "jails/$usr"
|