chiark / gitweb /
finalise
[chiark-utils.git] / sync-accounts / sync-accounts-createuser
1 #!/bin/sh
2 # $Id: sync-accounts-createuser,v 1.4 2002-07-14 19:35:55 ianmdlvl Exp $
3 #
4 # Copyright 1999-2002 Ian Jackson <ian@davenant.greenend.org.uk>
5 #
6 #  This is free software; you can redistribute it and/or modify it under
7 #  the terms of the GNU General Public License as published by the Free
8 #  Software Foundation; either version 2, or (at your option) any later
9 #  version.
10 #
11 #  This is distributed in the hope that it will be useful, but WITHOUT
12 #  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 #  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 #  for more details.
15 #
16 #  You should already have a copy of the GNU General Public License.
17 #  If not, write to the Free Software Foundation, Inc., 59 Temple
18 #  Place - Suite 330, Boston, MA 02111-1307, USA.
19
20 set -e
21 un=$SYNCUSER_CREATE_USER
22 ui=$SYNCUSER_CREATE_UID
23 gi=$SYNCUSER_CREATE_GID
24 ho=$SYNCUSER_CREATE_HOME
25 test -d $ho || mkdir $ho
26 chgrp $gi $ho
27 chown $ui $ho
28 chmod 2755 $ho