[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Make sure to create OS X Tor user in <500 range



Update of /home/or/cvsroot/tor/contrib/osx
In directory moria.mit.edu:/tmp/cvs-serv11695/contrib/osx

Modified Files:
	addsysuser 
Log Message:
Make sure to create OS X Tor user in <500 range

Index: addsysuser
===================================================================
RCS file: /home/or/cvsroot/tor/contrib/osx/addsysuser,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- addsysuser	5 Jan 2005 02:46:25 -0000	1.2
+++ addsysuser	1 Apr 2005 02:57:04 -0000	1.3
@@ -25,8 +25,9 @@
 home=/Users/$username
 # defhome is what goes into NetInfo
 defhome="/Network/Servers/MyServer/Users"
-#echo "Determining next available uid (please be patient)..."
-uiddef=`nidump passwd / | cut -d: -f3 | sort -n | tail -n 1`
+#echo "Determining next available system uid (please be patient)..."
+# Uids over 500 are for system 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