Problem in safe mode deleting users...

I am prepping a few Macs to sell on eBay and wanted to remove the user files and get them to do the startup song and dance when the new user turns it on. I used the following commands in Safe Mode:
mount -uw /
rm -rf /Users/*
cd /var/db
rm .AppleSetupDone
rm .com.apple.iokit.graphics
rm -rf dhcpclient
rm -rf samba
shutdown -h now
All this works fine, except it does not delete any users. So, I tried a few other commands, I used this one:
dscl . delete /users/username
typing the exact user name, and I get this response:
dscl[6] *** Uncaught DS Exception: <(null)> (eServerSendError)
I tried deleting all of them with:
dscl . delete /users/*
and I get the same response:
dscl[6] *** Uncaught DS Exception: <(null)> (eServerSendError)
I tried using:
sudo dscl . -delete /users
and get this again:
dscl[6] *** Uncaught DS Exception: <(null)> (eServerSendError)
I tried using:
niutil -read . /users/
When I do that and hit 'return' it drops a line and does..... nothing. It just sits there and won't respond to any commands, the prompt isn't there. I wait, and wait, and wait and it just sits there.
So, I have two questions:
1. How do I delete ALL users in Safe Mode (I don't want to start the computer and create a new user after I've made the computer redo the AppleSetup dance).
2. Why in the HECK does the cursor just sit there, on a blank line, and do nothing after I issue the niutil command?
I suppose, if it isn't possible to do this in Safe Mode and it must be done in Terminal, then I could do this and then boot into Safe Mode and issue the other commands, if someone knows how to do this, but I'd prefer to do it all at once in Safe Mode (if possible).
TIA
PS In case someone asks why I don't just wipe the drive and reinstall OS X and leave it, it is because on these I wanted to update everything using Software Update so that when it ships it's fully updated. I wanted to update it completely and then restore it to "factory" state so that when the new user turns it on it does the new user setup and has no other user accounts on it.

No offense, but perhaps you ddin't read my whole post. Both of the links you provided (which I've read before) do not allow one to UPDATE the software and then return it to a state that has the AppleSetup launching on boot. If I wanted to load OS X 10.4 without updating it to 10.4.11 then those solutions would work fine, but that isn't what I want to do. I want to update everything - Tiger and all the software - as far as it will go and THEN return the machine to factory state. I could go into why I want to do this, but I won't bore anyone. The point is, I do.
Can someone that understand Unix commands on the Mac help me? Thanks.

Similar Messages

  • Macbook shuts off during start-up - can't get through safe-mode, single user mode (fsck -fy) and target-drive shows no problems when running disk utility repair

    Hi everyone,
    I'm simply all out of ideas on what to do - my best guess is the problem is not specifically hard-drive related since all the 'normal' fixes just won't work.
    What could be the cause of my issue? The only way i've managed to keep the Macbook Pro on for longer than a minute is through target drive, where it seems to work just fine - i can access everything. To sum up everything:
    1 - I tried resetting the PRAM
    2 - I tried to go in to safe mode, it shut off before i could type the password
    3 - I tried fsck -fy command from single user mode, sometimes i can get to actually typing it but mostly it shuts off before
    4 - I tried to repair disk via target drive - success, no problems detected (and it didnt fix my issue)
    5 - I reinstalled OS Mavericks.
    The Macbook Pro previously had some problems with the power-button not working properly (a mac-cunning friend of mine had to open up the mac and start it by swiping to metal pins on a specific (battery/power?) part inside it. The problem kinda went away afterwards but it might be related to this?
    This is way off my comfort zone of 'diagnosing' issues, so I'm crossing fingers for some good advice.
    Thanks,
    Aske
    Denmark

    I think you're right.
    If it's hardware related, is it possible to guess at what it might be? It would be nice to know how much I should expect to pay for a repair before actually getting it fixed.

  • System problem and safe mode

    We seem to be having a system problem with one of the iMacs, which is running 10.5.3. It doesn't make sense to us, but I've been reading on the forums that 10.5.3 is causing problems, so we are thinking of downgrading back to 10.5.2. But what we don't understand at all is why everything seems to work very nicely in "safe mode" and not in the regular mode.
    Is there something specific to safe mode that turns off so things work? Should we be looking at something?
    Also, if we use Boot Camp for the PC side, the PC works fine. It all just seems strange.
    Thanks --
    susan

    Francine Schwieder wrote:
    The list of Login Items is a tab at the top of the user entry in the System Preference-> Accounts preference pane. I know there are check boxes in front of each item, but these do NOT activate/inactivate the items. In order to turn off something you need to select it and then click the minus button at the bottom. You may want to make a note of what items are there before doing this, so you can restore them later if necessary.
    While I do not have Time Capsule, I do have an Airport Base Station, with my printer plugged into it, and I am still astonished that when I first got it and turned on my iBook, and selected print, it immediately found the printer and asked if I wanted to use it. Didn't have to do a thing but click a yes button. So afraid I'm not the one to have any idea of what to do if wireless printing doesn't work.
    Francine
    Francine
    Schwieder
    Thanks so much -- I'm off to the Time Capsule folks to see if they can help with the printing. For now, at least the iMac is working!
    susan

  • Running FF 17 I can no longer see the hotmail login screen. I have tried in safe mode, deleted cache and cookies, etc.

    Running any version of FF I cannot see the hotmail login screen. It acts like the page has loaded but it is blank.

    Under Web Console I see the following (refreshing doesn't help):
    [08:52:44.211] Unknown pseudo-class or pseudo-element '-webkit-scrollbar-button'. Ruleset ignored due to bad selector. @ https://login.live.com/login.srf?wa=wsignin1.0&ct=1354306710&rver=6.1.6206.0&sa=1&ntprob=-1&wp=MBI_SSL_SHARED&wreply=https:%2F%2Fmail.live.com%2F%3Fowa%3D1%26owasuffix%3Dowa%252f&id=64855&snsc=1&cbcxt=mail:6
    And
    [08:52:44.819] ReferenceError: evt_Login_onload is not defined @ https://login.live.com/login.srf?wa=wsignin1.0&ct=1354306710&rver=6.1.6206.0&sa=1&ntprob=-1&wp=MBI_SSL_SHARED&wreply=https:%2F%2Fmail.live.com%2F%3Fowa%3D1%26owasuffix%3Dowa%252f&id=64855&snsc=1&cbcxt=mail:1

  • Firefox immediately reports problem on start and cannot be opened in safe mode.

    Anti-virus and anti-malware are run and no problems reported.
    Firefox reports error: firefox.exe has encountered an error and needs to be close.
    Firefox will still run for a little while but eventually crashes. Same problem in safe mode.
    The weird thing is Chrome also experiences same problems since firefox had these symptoms. Instead, Chrome shows "Aw Snap" on all pages. It however does work with a --no-sandbox command on startup.
    Crash Report: http://crash-stats.mozilla.com/report/index/eb1fb663-a3bd-44d3-8182-a135a2100505
    == Operating system ==
    Windows XP SP3

    I think it would be a good idea if you performed a clean install. Any corrupt files which are on the system and are causing this problem will be replaced. It's a very simple process and you won't lose any bookmarks. Here's how.
    Go to [http://www.mozilla.com/en-US/firefox/fx/?ref=logo Download Firefox 4.0.1] and download to the desktop.
    Then go to Add/Remove Programs, scroll down to "Mozilla Firefox" and remove it, choosing to keep your bookmarks, customizations etc., (''don't checkmark the box'').
    Then reboot and delete the folder called "Mozilla Firefox" at this location: C:\Program Files\Mozilla Firefox
    Finally run the installation file you downloaded to the desktop earlier.
    Your bookmarks, customizations etc., are maintained in a different location and will become available to you again once you complete the installation.

  • Deleting corrupt fonts from Safe Mode

    I can only boot my iMac in Safe Mode because of Kernel panics. They started right after I began using (though it was downloaded and installed weeks ago) a free font so now I'm trying to get rid of it. Problem is, safe mode only loads w/ about two dozen normal fonts. Where did the fonts I need to trash go? Thanks in advance for any leads.

    do you know which font it is? fonts are stored in /Library/Fonts or possibly in homedirectory/Library/fonts. delete the problem font and reboot normally.
    P.S. you might also want to clear font caches. The easiest is to use a 3rd party app for this. there are many that will do it: Onyx, Cocktail or Font Finagler.
    Message was edited by: V.K.

  • HT1436 My Power Mac G5 will not fully boot without safe mode, it only comes to a blue screen where my cursor duplicates in to 2, (one is frozen, one can move by moving the mouse). What is my problem, and how do I fix it?

    My Power Mac G5 will not fully boot without safe mode, it only comes to a blue screen where my cursor duplicates in to 2, (one is frozen, one can move by moving the mouse). What is my problem, and how do I fix it?

    Great clue Lukas...
    One way to test is to Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, Test for problem in Safe Mode...
    PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive
    Reboot, test again.
    If it only does it in Regular Boot, then it could be some hardware problem like Video card, (Quartz is turned off in Safe Mode), or Airport, or some USB or Firewire device, or 3rd party add-on, Check System Preferences>Accounts>Login Items window to see if it or something relevant is listed.
    Check the System Preferences>Other Row, for 3rd party Pref Panes.
    Also look in these if they exist, some are invisible...
    /private/var/run/StartupItems
    /Library/StartupItems
    /System/Library/StartupItems
    /System/Library/LaunchDaemons
    /Library/LaunchDaemons

  • Can't boot into safe mode - PC keyboard

    My Mini can't log in. I know why -- and even how to fix it -- but I'm unable to boot into any alternate state to make the fix.
    The situation: PC keyboard (AOpen 90.00029.UB1) and a Logitech 4-button mouse, both USB native; also tried Dell PS/2 keyboard with a USB adapter. VGA adapter is connected to analog LCD. Away from home; do not have OS X install DVDs with me. LoginWindow.plist is fatally borked, but I can't get at it to undo the damage.
    Symptoms: Mini will not respond to ANY keyboard actions during boot. Cmd-s, Cmd-v, Shift, Cmd-Opt-p-r, Cmd-Opt-o-f, or even C to boot from CD (I have a PPC Ubuntu live CD, never tested prior to this disaster). No feedback to indicate anything is happening.
    If it means anything, I have the startup chime turned off by a third-party utility. Much too loud for my household.
    Anyway, the sequence of events is ALWAYS the same:
    * Power on
    * No video (not just black -- no signal)
    * CD noises
    * With actual disc in drive, CD spin-up
    * Still no video
    * CD slows slightly (if disc in drive)
    * First video activity: gray logo screen
    * Spinning gear thing
    * Black screen
    * "Starting Mac OS X" (sometimes only a brief flash)
    * Stops at blue screen with mouse cursor, no Finder
    The Mini will only respond to: (1) power button on/off; (2) power-on-and-hold to go into that firmware update mode -- get scary loud tone, flashing LED, then above sequence as usual; and (3) mouse-down to eject CD. Oh, and I can move the mouse pointer around when I get to the blue screen. Yay.
    For the past 24 hours I have been searching the net for ANY indication that a PC keyboard is capable/incapable of inducing Safe Mode (or any other mode). Can't find a firm Yes or No, or even a Sometimes/Maybe.
    Wondering if keys are mapped differently on PC keyboards -- maybe Shift isn't really Shift as far as Mac ROM is concerned, so no Safe Mode? Tried other random key combos to no avail. Can't find a "rosetta stone" for USB keyboard signalling on net to prove/disprove theory.
    First Mac, no points of reference. Hopelessly lost.
    Help.
    Randall

    Final results are in. I ordered an Apple keyboard from Amazon, plugged it into the Mini tonight and wonder of wonders, I could get into Safe Mode, Single User Mode, Pie à la Mode, you name it. Microsoft and Apple clearly have different ideas about USB keyboards at the hardware level. (And just for the record, the Mac keyboard won't get me into my PC's BIOS either.)
    Fixing the login problem took considerably longer, but that's because I overlooked the obvious and wasted a lot of time on generic boot troubleshooting: If you got yourself into trouble with defaults write, a little reading of the Man pages will lead you to defaults delete.
    Things go much smoother when you have a well defined target.
    Anyway, anyone out there with a Mini and a PC keyboard, do the Safe Boot test now. If it ain't working, do yourself a favor and get a Mac keyboard.
    Thanks for all the help.
    Randall

  • Firefox won't open in normal or safe mode.

    I get a crash report each time when I try to open it normally, nothing happens when I type in the extension for safe mode. Because I can't open safe mode, the Mozilla troubleshooting guideliens cannot help me. I'm working from Windows vista, have all current updates to Windows, and have scanned my computer.

    To start in Firefox Safe Mode, hold down the Shift key while clicking on the Firefox desktop icon. To exit Firefox Safe Mode, exit from Firefox (Firefox button > Exit or File > Exit), wait a few seconds (10-30), click the desktop icon to restart Firefox.
    NOTE: Establish a habit of exiting/closing Firefox with Firefox button > Exit or File > Exit to allow an orderly shutdown of Firefox and closing of all of the files that Firefox has open.
    #Stop the Firefox process:
    #*[http://kb.mozillazine.org/Kill_application Mozillazine - Kill application]
    #*Windows 7 users click [http://www.techrepublic.com/blog/window-on-windows/reap-the-benefits-of-windows-7s-task-manager/2576 here]
    #*Mac users: http://techheavy.com/2011/02/the-mac-task-manager/
    #Why Firefox may hang:
    #*[http://support.mozilla.org/en-US/kb/Firefox+hangs Firefox hangs] (see Hang at exit)
    #*[http://kb.mozillazine.org/Firefox_hangs Firefox hangs (Mozillazine)] (see Hang at exit and Closing Firefox properly)
    #*[https://support.mozilla.org/en-US/kb/Firefox+is+already+running+but+is+not+responding Firefox is already running but is not responding]
    #Use Firefox Safe Mode to find a problem with an Extension or Plugin:
    #*Don't check anything when entering Safe Mode, just continue
    #*If the problem does not occur in Safe Mode it is probably an Extension or Plugin causing the problem
    #*See:
    #**[[Safe Mode]] and [http://kb.mozillazine.org/Safe_Mode Safe Mode (Mozillazine)]
    #**[http://support.mozilla.org/en-US/kb/Troubleshooting+extensions+and+themes Troubleshooting extensions and themes]
    #**[http://support.mozilla.org/en-US/kb/Troubleshooting+plugins Troubleshooting plugins]
    #**[http://support.mozilla.org/en-US/kb/Basic+Troubleshooting Basic Troubleshooting]
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Consider updating Firefox; your version is 9.0.1 --> current version is 10.0.1
    *See --> https://support.mozilla.org/en-US/kb/Updating%20Firefox

  • Logic pro 9 additional content won't install and iMac 27" late 2012 won't start in Safe Mode

    Hi,
    I have bought Logic Pro 9 and have encountered problems installing the Additional Content pack. I am using late 2012 iMac 27" (with fusion 3TB drive) and OS X Mavericks (10.9.1).
    For some reason the Additional Content pack does not install when downloaded from Logic Pro menu and it does not install either when using the .dmg file. I noticed that many users are facing the same problem, but they have resolved the issue installing the Additional Content in Safe Mode. However, my iMac does not boot in Safe Mode (other users are encountering this annoying problem and it remains unresolved by Apple, see https://discussions.apple.com/thread/5485131?start=0&tstart=0).
    This is extremely frustating, because I am using my iMac for my work and therefore it is impossible to backup my data reinstall the OS X. Additionally, I am using the computer for my music projects and I am completely stuck, because I cannot use insrument patches that I need.
    Does anyone have solution for this?

    Install on my Core2Duo 17" MacBook Pro went flawlessly, but install on my 8 Core Mac Pro suffered this problem.  Many thanks for the solution Don, it worked for me ;-)
    I am trying hard to supress an ironic chuckle though, reading other posts in this thread .... suggesting that people should call Apple Tech Support and expressing incredulity that people weren't doing this as their first option.
    Well I can say say that after several calls to Apple Tech Support, amounting to several hours on the phone, and well over an hour on the phone with them today, I was informed that this problem is a known bug, and that Apple are working on a solution.  They couldn't tell me what the bug is, what machines are affected, or what else might trigger it, or when a bug release might be due.
    Their troubleshooting steps basically involved various reboots, repairing disc permissions, reseting the user home directory via terminal, booting up in recovery mode (but not safe mode as per this solution) trashing various preferences files, and, as a final step, uninstalling and reinstalling from scratch.
    Only when all that failed was I told that there is a known bug that Apple are working on.
    I came here to see what the community was saying, as the Tech Support guy did say there was likely to be some info on the forums.  Lo and behold, a solution is posted and it works.
    Why are Apple's Tech Support (in the UK at least) not aware of this?
    Oh well, at least I'm up and running on my Mac Pro now.
    Thanks again Don,
    Cheers,
    Nigel

  • Early Imac 20" freezes on regular mode but works fine in safe mode, any ideas?

    Have a early 2006 Imac 20" that won't run in normal mode; freezes within minutes.  Run fine in safe mode, but safe mode won't play sound or allow exterior inputs.  In high fan state, don't know the name of the mode, but you hold the power button while plugging in power cord, the machine also runs relatively fine.  The machines been glitzy for years, developed the lines/colour patterns that's been mentioned in other forms/threads, but it still ran programs.  Took it to apple and they said the board is the issue and my machine is obsolete.  Fine, I just want to understand why it will run perfectly in safe mode; no lines, no freezing, all programs running...but won't last minutes in regular mode.  Also, if anyone has a way to play music...in bluetooth or appletv in safe mode, let me know.
    Thanks.

    Most of thee skinny on that...
    One way to test is to Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, Test for problem in Safe Mode...
    PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive
    Reboot, test again.
    If it only does it in Regular Boot, then it could be some hardware problem like Video card, (Quartz is turned off in Safe Mode), or Airport, or 3rd party add-on, Check System Preferences>Accounts>Login Items window to see if it or something relevant is listed.
    Check the System Preferences>Other Row, for 3rd party Pref Panes.
    Also look in these if they exist, some are invisible...
    /private/var/run/StartupItems
    /Library/StartupItems
    /System/Library/StartupItems
    /System/Library/LaunchDaemons
    /Library/LaunchDaemons

  • Why will my iMac boot fine in Safe Mode but freezes on a normal boot?

    It is a 17" iMac.  1.83Ghz Core 2 Duo.  1GB RAM.  160GB Hard Drive.  Combo Drive with Intel GMA 950 GPU. 
    I took out the screen and put in in a different computer a while back.  This was a working computer before hand.  I pulled it off the shelf the other day to get it going (using an External Monitor) and when it gets past the Apple Screen, it goes to the blue screen, and then loads the wallpaper and some of the taskbar, but no dock and it freezes.  (This is on a fresh install of Leopard).  When I boot to safe mode, it boots fine.  I have tried reseating RAM, different RAM sticks, and a different hard drive. Also replaced PRAM battery.  Done a SMC reset and a PRAM reset.  No change.
    Also worth noting was that when I tried to boot my Leopard disc, it would freeze at the Choose Language screen.  So I took the HD out and installed Leopard thru my other iMac and reinstalled OS X.  Did the same thing when I tried to boot from a Snow Leopard disc. 
    Ideas??

    Hello, in Safe Mode did you try setting a good resolution on the Display?
    One way to test is to Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, Test for problem in Safe Mode...
    PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive
    Reboot, test again.
    If it only does it in Regular Boot, then it could be some hardware problem like Video card, (Quartz is turned off in Safe Mode), or Airport, or 3rd party add-on, Check System Preferences>Accounts>Login Items window to see if it or something relevant is listed.
    Check the System Preferences>Other Row, for 3rd party Pref Panes.
    Also look in these if they exist, some are invisible...
    /private/var/run/StartupItems
    /Library/StartupItems
    /System/Library/StartupItems
    /System/Library/LaunchDaemons
    /Library/LaunchDaemons
    See this great post by themachead on how to list the extensions in Safe Mode with System Profiler then compare to the extension folder!
    http://discussions.apple.com/thread.jspa?messageID=10161377&#10161377

  • How can I transfer files from a 27" iMac which will only boot in safe mode?

    My late 2009 27" imac is having issues and will only boot in safe mode. I have tried to transfer files to a new Imac using migration assistant but it wont let me. If I try booting the old Imac normally I just get a grey screen, I believe it is the video card failed and am waiting for a fix, but I would like to transfer files before the fix in case something goes wrong and I lose everything.
    Any help would be great

    Hello Myles, likely it is a Hardware problem.
    One way to test is to Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, Test for problem in Safe Mode...
    PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive
    Reboot, test again.
    If it only does it in Regular Boot, then it could be some hardware problem like Video card, (Quartz is turned off in Safe Mode), or Airport, or 3rd party add-on, Check System Preferences>Accounts>Login Items window to see if it or something relevant is listed.
    Check the System Preferences>Other Row, for 3rd party Pref Panes.
    Also look in these if they exist, some are invisible...
    /private/var/run/StartupItems
    /Library/StartupItems
    /System/Library/StartupItems
    /System/Library/LaunchDaemons
    /Library/LaunchDaemons

  • Installed itunes 10.5.2 on my laptop and now it only runs in safe mode HELLLLP!!!

    I installed itunes 10.5.2 on my laptop and when it rebooted after it said that it could not connect to my ipod because of something to do with "apple mobile device" I tried unsuccessfully to find an answer and whilst trying to find an anwer my laptop froze and crashed and everything said it was not responding that was when it actually opened anything.
    I've found the solution to get it to connect to the mobile devices however my laptop will only run in safe mode and i cant fix the problem in safe mode!!
    My question is if I uninstall and reinstall itunes will i lose all my playlists? or does anyone have a solution to fix my itunes????????

    The Apple launch issues article suggests pulling 3rd-party plug-ins if the problem doesn't happen in Safe Mode.
    Here's the article that will walk you through the process -> iTunes: Troubleshooting issues with third-party iTunes plug-ins

  • Safe Mode In server 2012

    Hi, 
    I am facing a problem in safe mode. Today I test safe mode option in 2012 server, when i enabled it and restart the server  it always opening in safe mode. I disable safe mode and try to hit  f8 key again but it is not opening in safe mode. 
    Why? Because i did not check on safe mode option. 
    Now my question is- If some how my server is not booting in normal mode due to any software reason or  hardware reason and i want to open it in safe mode. How it would be open in safe mode whereas i did not enable safe mode. 
    If the safe mode can be enable in only normal mode than how we can troubleshoot the problem?
    May be my question could be wrong.
    Please let me know how it works ......
    Thanks
    Gopal 
    Gopal Rawat

    Hi,
    To enable Safe Mode, please try the following:
    1. If you can boot into Windows, please open a privileged command prompt.
    2. If not, please boot into recovery mode and run command prompt.
    3. In the command prompt, please input
    Bcdedit /set {bootmgr} displaybootmenu yes
    4. Once completed, please restart your computer, then press F8 to enter setup screen upon startup,
    then press F4 or 4 to enter safemode.
    References:
    How to easily enter safe mode in windows 8? (One-click series)
    http://support.microsoft.com/kb/2809468
    http://www.vmwareandme.com/2014/01/guide-how-to-boot-windows-8-windows-81.html
    Regards,
    Rafic
    If you found this post helpful, please give it a "Helpful" vote.
    If it answered your question, remember to mark it as an "Answer".
    This posting is provided "AS IS" with no warranties and confers no rights! Always test ANY suggestion in a test environment before implementing!

Maybe you are looking for