No Users

mss128

Registered
So I was trying to add one of the macs in the office to a windows workgroup. I inadvertantly deleted the user on the mac, so now when I login there is no users. Any ideas on how to correct such a mistake?
 
You could probably start up that computer with disc 1 of your install discs (hold the c key down on restart till you see 'Install' Screen) and hopefully in the File menu you'll have an 'add user' option. If not, you may have to reinstall OS X on that machine.
 
The install disks for this machine are no longer with us. I tried some from a comparable machine here but it wouldn't even let me get past the first screen as it wasn't the proper disk.
 
Try this:

1. Boot into single user mode
(Hold down Command+S after chime, until you see a black screen with text)
2. Enter the following at the prompts:
Code:
cd /private/var/db
rm .AppleSetupDone
cd netinfo
rm -rf local.nidb
exit

This essentially removes the flag that Apple's setup was finished, and it nukes the netinfo database, which holds data for your users.

3. After the system restarts, you will go through the mini-setup. Re-enter the data for your user (try to keep the name / shortname the same)

4. If everything went well, you'll be in business. If you can't access your files, then its probably due to a mismatched / missing uid issue. You can go into terminal and do a:

chown -R user1 /Users/user2

(user1 is your current shortname, and user2 is the previous one that you can't access)

See if that works. Should save you from a reinstall.
 
If you have another mac, you can connect it to the user-less mac via firewire cable. Set the user-less mac to Target Mode: Reboot and hold T Key till you see firewire symbol, and put the system disc in the other mac (you'll have to restart this mac as I said in my previous post for reinstalling osx).

Once the install window comes up you can then begin the reinstall process and choose your user-less mac (that's now a firewire hard drive listed in the possible install locations when you get that far) then you can reinstall OS X on that machine.
 
Thanks for the reply.

On the first line of your code I get a message saying that directory doens't exist.

Sounds like what your suggesting makes sense, but no luck getting past that first change directory command.
 
cd /private/var/db

gives you

cd: /private/var/db: No such file or directory

??

That's not good :) Are you SURE you typed it correctly? Those are forward slashes, not backslashes. All lowercase - it is case sensitive.
 
Back
Top