diff options
author | Filipp Lepalaan <filipp@mac.com> | 2010-04-16 10:58:29 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2010-04-16 10:58:29 +0300 |
commit | 105a08740f6b9184f5344e68f680624b815ab27c (patch) | |
tree | 69c34ac1abd95f555604d23bbefa47414cebd2aa | |
parent | 5b41bcc780ab746e4c4881fb3edea454dc4c2ac9 (diff) | |
download | mtk-105a08740f6b9184f5344e68f680624b815ab27c.tar.gz mtk-105a08740f6b9184f5344e68f680624b815ab27c.tar.bz2 mtk-105a08740f6b9184f5344e68f680624b815ab27c.zip |
mob2loc fixes
-rwxr-xr-x | mob2loc.sh | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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" |