| 1 |
#!/bin/sh |
| 2 |
# $Id: sync-accounts-createuser,v 1.6 2007-09-21 21:21:15 ianmdlvl Exp $ |
| 3 |
# |
| 4 |
# Copyright 1999-2002 Ian Jackson <[email protected]> |
| 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 3, 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, consult the Free Software Foundation's website at |
| 18 |
# www.fsf.org, or the GNU Project website at www.gnu.org. |
| 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 |