sonjaya a icrit :
> Thx is working, but how to set every i adduser have automatic add in
> /var/www/user/simbloic link .
> thx
I don't add users too often so I do this manually, but you could as well
use a shell script like the following:
#! /bin/sh
#
if test $# -ne 1; then
echo "usage: `basename $0` <username>" >&2
exit 1;
fi
if ! useradd -m $1; then
echo "`basename $0`: useradd failure." >&2
exit 1;
fi
mkdir -p /var/www/accounts/$1/public && \
ln -s /var/www/accounts/$1/public /var/www/users/$1 && \
ln -s /var/www/accounts/$1 /home/$1/www
if test $? -ne 0; then
echo "`basename $0`: something went wrong." >&2
exit 1;
fi
exit 0;
i just made it out and didn't test it, you'll have to fix it yourself ;)