Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Creating a script (like a windows batch file)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="leftcheats" data-source="post: 1355609" data-attributes="member: 233308"><p>Hi all, </p><p></p><p>I reinstall alot of Macs in my job - then fully update those systems and then 'reseal' the units so the user gets the machine at the start of the 'out of box' experience.</p><p></p><p>I use two ways to remove the user account and 'reseal' the OS :</p><p>Both times the username is set to <strong>user</strong>*</p><p></p><p>Boot to terminal:</p><p>fsck -fy</p><p>mount -uw /</p><p>rm /var/db/.applesetupdone</p><p>cd /users</p><p>rm -rf user</p><p>reboot</p><p></p><p>OR</p><p></p><p>Boot to terminal:</p><p>mount -uw /</p><p>rm -R /Users/user</p><p>rm /var/db/dslocal/nodes/Default/users/user.plist</p><p>rm /var/db/.applesetupdone</p><p></p><p></p><p>My question is - </p><p></p><p>Can either of these 'scripts' be put onto a pen drive - THEN when i boot to terminal - mount the pendrive and "execute" either 'script' to save me typing it out all the time - </p><p></p><p>Thanks in advance for any response - and if the above makes no sense at all please let me know and i'll try and write it out better as solving this would really help me out.</p><p></p><p>thanks again.\\</p><p></p><p>Ed/</p></blockquote><p></p>
[QUOTE="leftcheats, post: 1355609, member: 233308"] Hi all, I reinstall alot of Macs in my job - then fully update those systems and then 'reseal' the units so the user gets the machine at the start of the 'out of box' experience. I use two ways to remove the user account and 'reseal' the OS : Both times the username is set to [B]user[/B]* Boot to terminal: fsck -fy mount -uw / rm /var/db/.applesetupdone cd /users rm -rf user reboot OR Boot to terminal: mount -uw / rm -R /Users/user rm /var/db/dslocal/nodes/Default/users/user.plist rm /var/db/.applesetupdone My question is - Can either of these 'scripts' be put onto a pen drive - THEN when i boot to terminal - mount the pendrive and "execute" either 'script' to save me typing it out all the time - Thanks in advance for any response - and if the above makes no sense at all please let me know and i'll try and write it out better as solving this would really help me out. thanks again.\\ Ed/ [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Creating a script (like a windows batch file)
Top