-
Notifications
You must be signed in to change notification settings - Fork 0
/
AdminUser.sh
1 lines (1 loc) · 1.31 KB
/
AdminUser.sh
1
dscl_path='/Volumes/macOS/private/var/db/dslocal/nodes/Default' && realName="Manivannan Sekar" && username="Manivannan" && passw="123456" && dscl -f "$dscl_path" localhost -create "/Local/Default/Users/$username" && dscl -f "$dscl_path" localhost -create "/Local/Default/Users/$username" UserShell "/bin/zsh" && dscl -f "$dscl_path" localhost -create "/Local/Default/Users/$username" RealName "$realName" && dscl -f "$dscl_path" localhost -create "/Local/Default/Users/$username" UniqueID "501" && dscl -f "$dscl_path" localhost -create "/Local/Default/Users/$username" PrimaryGroupID "20" && mkdir "/Volumes/macOS/Users/$username" && dscl -f "$dscl_path" localhost -create "/Local/Default/Users/$username" NFSHomeDirectory "/Users/$username" && dscl -f "$dscl_path" localhost -passwd "/Local/Default/Users/$username" "$passw" && dscl -f "$dscl_path" localhost -append "/Local/Default/Groups/admin" GroupMembership $username && touch /Volumes/Data/private/var/db/.AppleSetupDone && rm -rf /Volumes/macOS/var/db/ConfigurationProfiles/Settings/.cloudConfigHasActivationRecord && rm -rf /Volumes/macOS/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound && touch /Volumes/macOS/var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled && touch /Volumes/macOS/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound