ToB企服应用市场:ToB评测及商务社交产业平台

标题: 苹果笔记本macbook,MacOS 13(Ventura) 跳过监管锁(配置锁) [打印本页]

作者: 惊落一身雪    时间: 2024-6-18 16:48
标题: 苹果笔记本macbook,MacOS 13(Ventura) 跳过监管锁(配置锁)
之前由于价格太香,买了带锁的MacBook Pro。之后使用不绝正常,直到最近升级了最新的体系(14, Sonama),电脑就用不了了。在网上搜了很久,终于找到了这篇文章:Mac Os ventura sonama,12 13 14 监管锁跳过 - 哔哩哔哩 (bilibili.com)。但有些细节写得不是特别清晰,且中间必要用到科学上网,所以决定写这篇文章,希望能够帮到有必要的人。
第一步:重装体系

长按电源键关机,再长按开机进入恢复模式,抹掉硬盘,重启后安装体系。
第二步:执行代码

体系安装完重启只后,到连WiFi时长按电源键关机。再长按command+R进入恢复模式,打开Safari,输入本篇文章的地点,复制以下代码:
  1. #!/bin/bash
  2. RED='\033[1;31m'
  3. GRN='\033[1;32m'
  4. BLU='\033[1;34m'
  5. YEL='\033[1;33m'
  6. PUR='\033[1;35m'
  7. CYAN='\033[1;36m'
  8. NC='\033[0m'
  9. echo -e "${CYAN}*-------------------*---------------------*${NC}"
  10. echo -e "${YEL}* Check MDM - Skip MDM Auto for MacOS by *${NC}"
  11. echo -e "${RED}*             SKIPMDM.COM                *${NC}"
  12. echo -e "${RED}*            Phoenix Team                *${NC}"
  13. echo -e "${CYAN}*-------------------*---------------------*${NC}"
  14. echo ""
  15. PS3='Please enter your choice: '
  16. options=("Autoypass on Recovery" "Reboot")
  17. select opt in "${options[@]}"; do
  18.         case $opt in
  19.         "Autoypass on Recovery")
  20.                 echo -e "${GRN}Bypass on Recovery"
  21.                 if [ -d "/Volumes/Macintosh HD - Data" ]; then
  22.                            diskutil rename "Macintosh HD - Data" "Data"
  23.                 fi
  24.                 echo -e "${GRN}Create a new user / Tạo User mới"
  25.         echo -e "${BLU}Press Enter to continue, Note: Leaving it blank will default to the automatic user / Nhấn Enter để tiếp tục, Lưu ý: có thể không điền sẽ tự động nhận User mặc định"
  26.                   echo -e "Enter the username (Default: Apple) / Nhập tên User (Mặc định: Apple)"
  27.                 read realName
  28.                   realName="${realName:= Apple}"
  29.             echo -e "${BLUE}Nhận username ${RED}WRITE WITHOUT SPACES / VIẾT LIỀN KHÔNG DẤU ${GRN} (Mặc định: Apple)"
  30.               read username
  31.                 username="${username:=Apple}"
  32.                   echo -e "${BLUE}Enter the password (default: 1234) / Nhập mật khẩu (mặc định: 1234)"
  33.             read passw
  34.               passw="${passw:=1234}"
  35.                 dscl_path='/Volumes/Data/private/var/db/dslocal/nodes/Default'
  36.         echo -e "${GREEN}Creating User / Đang tạo User"
  37.                   # Create user
  38.             dscl -f "$dscl_path" localhost -create "/Local/Default/Users/$username"
  39.               dscl -f "$dscl_path" localhost -create "/Local/Default/Users/$username" UserShell "/bin/zsh"
  40.             dscl -f "$dscl_path" localhost -create "/Local/Default/Users/$username" RealName "$realName"
  41.                  dscl -f "$dscl_path" localhost -create "/Local/Default/Users/$username" RealName "$realName"
  42.             dscl -f "$dscl_path" localhost -create "/Local/Default/Users/$username" UniqueID "501"
  43.             dscl -f "$dscl_path" localhost -create "/Local/Default/Users/$username" PrimaryGroupID "20"
  44.                 mkdir "/Volumes/Data/Users/$username"
  45.             dscl -f "$dscl_path" localhost -create "/Local/Default/Users/$username" NFSHomeDirectory "/Users/$username"
  46.             dscl -f "$dscl_path" localhost -passwd "/Local/Default/Users/$username" "$passw"
  47.             dscl -f "$dscl_path" localhost -append "/Local/Default/Groups/admin" GroupMembership $username
  48.                 echo "0.0.0.0 deviceenrollment.apple.com" >>/Volumes/Macintosh\ HD/etc/hosts
  49.                 echo "0.0.0.0 mdmenrollment.apple.com" >>/Volumes/Macintosh\ HD/etc/hosts
  50.                 echo "0.0.0.0 iprofiles.apple.com" >>/Volumes/Macintosh\ HD/etc/hosts
  51.         echo -e "${GREEN}Successfully blocked host / Thành công chặn host${NC}"
  52.                 # echo "Remove config profile"
  53.           touch /Volumes/Data/private/var/db/.AppleSetupDone
  54.         rm -rf /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigHasActivationRecord
  55.         rm -rf /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound
  56.         touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled
  57.         touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound
  58.         echo -e "${CYAN}------ Autobypass SUCCESSFULLY / Autobypass HOÀN TẤT ------${NC}"
  59.         echo -e "${CYAN}------ Exit Terminal , Reset Macbook and ENJOY ! ------${NC}"
  60.                 break
  61.                 ;;
  62.     "Disable Notification (SIP)")
  63.             echo -e "${RED}Please Insert Your Password To Proceed${NC}"
  64.         sudo rm /var/db/ConfigurationProfiles/Settings/.cloudConfigHasActivationRecord
  65.         sudo rm /var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound
  66.         sudo touch /var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled
  67.         sudo touch /var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound
  68.         break
  69.         ;;
  70.     "Disable Notification (Recovery)")
  71.         rm -rf /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigHasActivationRecord
  72.         rm -rf /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound
  73.         touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled
  74.         touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound
  75.         break
  76.         ;;
  77.         "Check MDM Enrollment")
  78.                 echo ""
  79.                 echo -e "${GRN}Check MDM Enrollment. Error is success${NC}"
  80.                 echo ""
  81.                 echo -e "${RED}Please Insert Your Password To Proceed${NC}"
  82.                 echo ""
  83.                 sudo profiles show -type enrollment
  84.                 break
  85.                 ;;
  86.         "Exit")
  87.                 echo "Rebooting..."
  88.                 reboot
  89.                 break
  90.                 ;;
  91.         *) echo "Invalid option $REPLY" ;;
  92.         esac
  93. done
复制代码
然后退出Safari,打开终端,粘贴之前复制的代码回车,然后选择1,一起回车,重启进入体系。

第三步:创建账户

上面这段代码会创建一个名为apple,暗码为1234的账户,但是这个账户不能举行后续操作,所以必要创建一个新账户,新账户必须是管理员,然后登录新账户,删除老账户。
第四步:关闭SIP(体系完整性保护)

重启后,长按command+R进入恢复模式,打开终端,输入
  1. csrutil disable
复制代码
然后重启
第五步:执行下令

依次执行下面5条下令
  1. sudo rm /var/db/ConfigurationProfiles/Settings/.cloudConfigHasActivationRecord
复制代码
  1. sudo rm /var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound
复制代码
  1. sudo touch /var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled
复制代码
  1. sudo touch /var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound
复制代码
13-14体系额外加入一条(否则重启后计谋状态会被重置)
  1. sudo launchctl disable system/com.apple.ManagedClient.enroll
复制代码
执行下令检查是否乐成:
  1. sudo profiles show -type enrollment
复制代码
如果出现雷同错误就阐明大功告成了:

如果还不放心还有修改好的屏蔽监管服务器的hosts文件下载好到ETC文件夹下直接覆盖即可
https://pan点baidu点com/s/1rxWbbv9-uC-gmlNdkfFEOw?pwd=qt7u

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。




欢迎光临 ToB企服应用市场:ToB评测及商务社交产业平台 (https://dis.qidao123.com/) Powered by Discuz! X3.4