aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2010-04-16 10:34:08 +0300
committerFilipp Lepalaan <filipp@mac.com>2010-04-16 10:34:08 +0300
commitcfdfbc406a80711c527c71c04ac090d0fc34a591 (patch)
treebe174a49630e75e1ce1ce6e0e6c1cce93938ba90
parentaa769552aca49384e3ccb0d155aa238a4ac3de34 (diff)
downloadmtk-cfdfbc406a80711c527c71c04ac090d0fc34a591.tar.gz
mtk-cfdfbc406a80711c527c71c04ac090d0fc34a591.tar.bz2
mtk-cfdfbc406a80711c527c71c04ac090d0fc34a591.zip
mob2loc fixes
-rwxr-xr-xmob2loc.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/mob2loc.sh b/mob2loc.sh
index aa931fc..8dc7e71 100755
--- a/mob2loc.sh
+++ b/mob2loc.sh
@@ -6,7 +6,7 @@ if [[ $USER != "root" ]]; then
exit 1
fi
-usage="$(basename $0) username password"
+usage="usage: $(basename $0) username password"
if [[ $# -lt 2 ]]; then
echo $usage 2>&1
@@ -41,9 +41,9 @@ dscl . -delete /users/$username
# Create local user
dscl . -create /users/$username UniqueID $new_uid
dscl . -create /users/$username RealName "$new_rn"
-dscl . -create /users/$username UserShell $new_shell
+dscl . -create /users/$username UserShell "/bin/bash"
dscl . -create /users/$username GeneratedUID $(uuidgen)
-dscl . -create /users/$username PrimaryGroupID $new_gid
+dscl . -create /users/$username PrimaryGroupID 20
dscl . -create /users/$username NFSHomeDirectory $newhome
# Give admin perms
@@ -53,4 +53,4 @@ dscl . -append /groups/admin users $username
dscl . -passwd /users/$username "$password"
# Set correct permissions
-chown -R $username:staff
+chown -R $username:staff $newhome