X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/385c3534feda76934476fd3a058574fc84e302da..f8e7de3e6b0f0f92edb07fc87dacb4c499849e87:/scripts/domtool-addacl diff --git a/scripts/domtool-addacl b/scripts/domtool-addacl index 6675de0..f61bd31 100755 --- a/scripts/domtool-addacl +++ b/scripts/domtool-addacl @@ -1,5 +1,16 @@ #!/bin/sh -e -domtool-admin grant $1 user $1 -domtool-admin grant $1 group $1 -domtool-admin grant $1 path /afs/hcoop.net/usr/$1 +USER="$1" +if test -z "$USER"; then + echo Usage: domtool-addacl USERNAME + exit 1 +fi + +PATHBITS=`echo $USER | head -c 1`/`echo $USER | head -c 2`/$USER +HOMEPATH=/afs/hcoop.net/user/$PATHBITS + +domtool-admin grant $USER user $USER +domtool-admin grant $USER path $HOMEPATH + +# disabled since we want to discourage the use of unix groups +#domtool-admin grant $USER group $USER