aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-07-26 00:33:48 +0000
committerNick Mathewson <nickm@torproject.org>2005-07-26 00:33:48 +0000
commitc22bcecd839a86b9e1c07d942d47ee56d45a35d3 (patch)
tree6a68633258d3b6570da1c4da8ec8523b5b2e8cd0
parent22e6ecdb04c07505f5136f20d224b9bed616e9ce (diff)
downloadtor-c22bcecd839a86b9e1c07d942d47ee56d45a35d3.tar
tor-c22bcecd839a86b9e1c07d942d47ee56d45a35d3.tar.gz
Add niutil fix from Christopher Soghoian
svn:r4678
-rwxr-xr-xcontrib/osx/addsysuser26
1 files changed, 13 insertions, 13 deletions
diff --git a/contrib/osx/addsysuser b/contrib/osx/addsysuser
index 8a22d75bc..a674a1b4e 100755
--- a/contrib/osx/addsysuser
+++ b/contrib/osx/addsysuser
@@ -16,8 +16,8 @@ username=$1
realname=$2
homedir=$3
# GID 20 is "staff" which is the default. Change it if you want.
-gid=`niutil -readprop / /groups/daemon gid`
-if [ "x`niutil -list / /users|cut -f2 -d' '|grep $username`" != "x" ]; then
+gid=`niutil -readprop . /groups/daemon gid`
+if [ "x`niutil -list . /users|cut -f2 -d' '|grep $username`" != "x" ]; then
echo The account $username already exists.
exit 0
fi
@@ -30,14 +30,14 @@ defhome="/Network/Servers/MyServer/Users"
uiddef=`nidump passwd / | cut -d: -f3 | sort -n | grep -v '^[56789]..' |grep -v '^....$' | tail -n 1`
uiddef=`echo $uiddef + 1 |bc`
echo Creating account for $username...
-niutil -create / /users/$username
-niutil -createprop / /users/$username _writers_tim_passwd $username
-niutil -createprop / /users/$username realname $realname
-niutil -createprop / /users/$username _writers_passwd $username
-niutil -createprop / /users/$username uid $uiddef
-#niutil -createprop / /users/$username home_loc "<home_dir><url>afp://afp.server.com/Users/</url><path>$username</path></home_dir>"
-niutil -createprop / /users/$username gid $gid
-niutil -createprop / /users/$username home $homedir
-niutil -createprop / /users/$username name $username
-niutil -createprop / /users/$username passwd '*'
-niutil -createprop / /users/$username shell /dev/null
+niutil -create . /users/$username
+niutil -createprop . /users/$username _writers_tim_passwd $username
+niutil -createprop . /users/$username realname $realname
+niutil -createprop . /users/$username _writers_passwd $username
+niutil -createprop . /users/$username uid $uiddef
+#niutil -createprop . /users/$username home_loc "<home_dir><url>afp://afp.server.com/Users/</url><path>$username</path></home_dir>"
+niutil -createprop . /users/$username gid $gid
+niutil -createprop . /users/$username home $homedir
+niutil -createprop . /users/$username name $username
+niutil -createprop . /users/$username passwd '*'
+niutil -createprop . /users/$username shell /dev/null