Reset Leopard to Intro

Brendon Bauer

macrumors 6502
Original poster
May 14, 2007
344
0
Good 'ol USofA
When selling computers running Tiger I would always set up an admin account, preinstall some software, and then reset the computer back to the intro movie so that when my buyer would turn on the computer, it would greet him with the intro movie and setup. He/she could then set up their own account and then delete the admin account I had set up earlier. This was the only way I knew of to sell a computer with software preinstalled, and still offer a great first experience for the buyer.

This is the command I would use in terminal,

sudo mv /private/var/db/.AppleSetupDone /private/var/db/.setupnotdone

After that, I'd shut down the computer, turn it on to test it, and then shut it down once I saw that it worked--and then I'd send it off.

Can anyone verify that this still works in Leopard?
 

ebel3003

macrumors 6502a
Jun 20, 2007
630
0
"The Google"
The file doesn't seem to be there anymore. I'm guessing that it posed as a security risk in workplaces, being able to create an admin account so easily.
 

Brendon Bauer

macrumors 6502
Original poster
May 14, 2007
344
0
Good 'ol USofA
But doesn't the terminal command require an admin in the first place? Isn't that what 'sudo' is? I wouldn't think it was a security risk... But what do I know lol.

It'd be nice if someone could figure this out, because I have to ship off a computer at the end of this week... I'm no good with that kind of stuff. :eek:
 

rendezvouscp

macrumors 68000
Aug 20, 2003
1,526
0
Long Beach, California
I didn't test it, but I would presume it still works. The file (/private/var/db/.AppleSetupDone) is there (I could edit it), so I would presume that everything still works the same.
-Chasen
 

ebel3003

macrumors 6502a
Jun 20, 2007
630
0
"The Google"
But doesn't the terminal command require an admin in the first place? Isn't that what 'sudo' is? I wouldn't think it was a security risk... But what do I know lol.

It'd be nice if someone could figure this out, because I have to ship off a computer at the end of this week... I'm no good with that kind of stuff. :eek:
Yes it does, but you can be at root level simply by restarting in Single User mode. Then you could delete that file, restart, and there you go, you're in.
 

Brendon Bauer

macrumors 6502
Original poster
May 14, 2007
344
0
Good 'ol USofA
A nice way to play a little prank on your friends, heh. :p That does seem to be a pretty big risk. Shouldn't that be obvious to Apple? Anyways, thanks for checking for me! I'll try it out sometime in the next day or two and post back to let you know if it works or not.
 

ebel3003

macrumors 6502a
Jun 20, 2007
630
0
"The Google"
Ack, my bad I forgot the -a param when running ls and totally missed that file. It's still there as the above poster said...
 

Brendon Bauer

macrumors 6502
Original poster
May 14, 2007
344
0
Good 'ol USofA
Well I tried it, and unfortunately it didn't work :(. I need to get this thing back to the state where you turn it on and you get the intro movie along with setup. I used the exact command that I mentioned in my first post. Basically just renamed .AppleSetupDone to .setupnotdone. However, I restarted the computer and it started up like normal and logged in... Any ideas? I'm hoping to get this computer ready by tomorrow :(.

Could anyone figure it out and let me know if there's another way to do it?
 

Brendon Bauer

macrumors 6502
Original poster
May 14, 2007
344
0
Good 'ol USofA
Last call.... I have to ship it out tomorrow morning. Anyone have any idea? It's always wonderful to get the welcome video when you receive a new computer. I can't figure out how to do it :(.
 

hanschien

macrumors 6502
Oct 2, 2006
337
13
Houston, TX
Last call.... I have to ship it out tomorrow morning. Anyone have any idea? It's always wonderful to get the welcome video when you receive a new computer. I can't figure out how to do it :(.
Deleting the file will start the Setup Assistant on the next start up, but you will also need to delete the account you have been using along with the home folders.
 

Brendon Bauer

macrumors 6502
Original poster
May 14, 2007
344
0
Good 'ol USofA
So, did mv in the command that I tried stand for "move" in terminal? Or did it just rename the file? Or what? What command would I use in terminal to delete a file. I'm a complete noob when it comes to terminal.

Thanks!
 

Brendon Bauer

macrumors 6502
Original poster
May 14, 2007
344
0
Good 'ol USofA
Tried it, and it didn't work. I've tried "sudo rm /private/var/db/.AppleSetupDone", entered the password, and hit enter. I get no feedback, but just assume that it's removed the file. I've also tried "sudo rm /private/var/db/.setupnotdone" because I had previously renamed the file to that. Same thing. I restart the computer and it logs in normally--it does not take me to the setup and welcome video.

You sure that works?
 

hanschien

macrumors 6502
Oct 2, 2006
337
13
Houston, TX
Tried it, and it didn't work. I've tried "sudo rm /private/var/db/.AppleSetupDone", entered the password, and hit enter. I get no feedback, but just assume that it's removed the file. I've also tried "sudo rm /private/var/db/.setupnotdone" because I had previously renamed the file to that. Same thing. I restart the computer and it logs in normally--it does not take me to the setup and welcome video.

You sure that works?
Are you doing this from Terminal or Single User Mode? If you're doing this from Single User Mode, you need to "mount -uw /" to make the volume write-able.
 

Brendon Bauer

macrumors 6502
Original poster
May 14, 2007
344
0
Good 'ol USofA
I'm doing this from terminal. I have tried these two exact commands. I tried the first one, just for heck of it. I used the second one because I had previously used "mv" to rename the file to that file name because that worked in Tiger.

sudo rm /private/var/db/.AppleSetupDone

sudo rm /private/var/db/.setupnotdone

After each one, it just returns me to the command line. It doesn't say it's successful, but it doesn't say it failed. I'm not sure exactly what happened :p.

???
 

antibact1

macrumors 6502
Jun 1, 2006
334
0
I'm doing this from terminal. I have tried these two exact commands. I tried the first one, just for heck of it. I used the second one because I had previously used "mv" to rename the file to that file name because that worked in Tiger.

sudo rm /private/var/db/.AppleSetupDone

sudo rm /private/var/db/.setupnotdone

After each one, it just returns me to the command line. It doesn't say it's successful, but it doesn't say it failed. I'm not sure exactly what happened :p.

???
Do a sudo bash and do all you need to do within it.
 

Brendon Bauer

macrumors 6502
Original poster
May 14, 2007
344
0
Good 'ol USofA
Mine was a clean install too. Did it tell you that something happened after you entered your password? Or did it just dump you to the command line again. And did you restart to try it? I'm not sure why it's not working. How can I tell if I've deleted it? I'm not sure how to look in terminal to see if it's still there.
 

hanschien

macrumors 6502
Oct 2, 2006
337
13
Houston, TX
Mine was a clean install too. Did it tell you that something happened after you entered your password? Or did it just dump you to the command line again. And did you restart to try it? I'm not sure why it's not working. How can I tell if I've deleted it? I'm not sure how to look in terminal to see if it's still there.
Code:
ls -Fla
will list all files
 

Brendon Bauer

macrumors 6502
Original poster
May 14, 2007
344
0
Good 'ol USofA
lol.... it worked. I changed the password from nothing to "test" and then tried it. Apparently you can't sudo rm something in terminal with no password. It just doesn't work. When I created a password for the account it worked. Thanks for the help!
 

hanschien

macrumors 6502
Oct 2, 2006
337
13
Houston, TX
lol.... it worked. I changed the password from nothing to "test" and then tried it. Apparently you can't sudo rm something in terminal with no password. It just doesn't work. When I created a password for the account it worked. Thanks for the help!
Remember, Setup Assistant will not reset the accounts already on the computer nor delete the home folders.
 

Brendon Bauer

macrumors 6502
Original poster
May 14, 2007
344
0
Good 'ol USofA
Yeah, I know. I still like this method. They turn it on, set up there account, and when they log in all the software is in the applications folder. I tell them that they can delete the other account that I named "SoftwareSetup" so that takes care of that.

Thanks again for your help!
Brendon
 

hanschien

macrumors 6502
Oct 2, 2006
337
13
Houston, TX
No problem, glad to help.

To delete users in 10.5
Code:
dscl . delete /users/[i]username[/i]
Verify that it's been deleted
Code:
dscl . list /users
Remove users home directory
Code:
 rm -rf /users/[i]username[/i]
 

Similar threads

Register on MacRumors! This sidebar will go away, and you'll see fewer ads.