[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Add niutil fix from Christopher Soghoian
Update of /home/or/cvsroot/tor/contrib/osx
In directory moria:/tmp/cvs-serv10165
Modified Files:
addsysuser
Log Message:
Add niutil fix from Christopher Soghoian
Index: addsysuser
===================================================================
RCS file: /home/or/cvsroot/tor/contrib/osx/addsysuser,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- addsysuser 1 Apr 2005 02:57:04 -0000 1.3
+++ addsysuser 26 Jul 2005 00:33:48 -0000 1.4
@@ -16,8 +16,8 @@
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 @@
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