From 105a08740f6b9184f5344e68f680624b815ab27c Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Fri, 16 Apr 2010 10:58:29 +0300 Subject: mob2loc fixes --- mob2loc.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mob2loc.sh b/mob2loc.sh index 1049ab9..ad4c83c 100755 --- a/mob2loc.sh +++ b/mob2loc.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash # Convert Mobile account to Local +# @author Filipp Lepalaan if [[ $USER != "root" ]]; then echo "This tool must be run as root" >&2 @@ -33,7 +34,7 @@ nextid() { } new_uid=$(nextid /Users UniqueID) -new_gid=$(nextid /groups PrimaryGroupID) +new_gid=$(nextid /Groups PrimaryGroupID) newhome="/Users/$username" @@ -49,7 +50,7 @@ dscl . -create /Users/$username PrimaryGroupID 20 dscl . -create /Users/$username NFSHomeDirectory $newhome # Give admin perms -dscl . -append /groups/admin users $username +dscl . -append /Groups/admin users $username # Set the password dscl . -passwd /Users/$username "$password" -- cgit v1.2.3