aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2010-04-16 10:58:29 +0300
committerFilipp Lepalaan <filipp@mac.com>2010-04-16 10:58:29 +0300
commit105a08740f6b9184f5344e68f680624b815ab27c (patch)
tree69c34ac1abd95f555604d23bbefa47414cebd2aa
parent5b41bcc780ab746e4c4881fb3edea454dc4c2ac9 (diff)
downloadmtk-105a08740f6b9184f5344e68f680624b815ab27c.tar.gz
mtk-105a08740f6b9184f5344e68f680624b815ab27c.tar.bz2
mtk-105a08740f6b9184f5344e68f680624b815ab27c.zip
mob2loc fixes
-rwxr-xr-xmob2loc.sh5
1 files 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 <filipp@mcare.fi>
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"