I can't delete a user account

Hi,
I have a imac with OSX leopard 10.5.5.
Several months ago, I created a user account on my computer just to try, and I used it only once. Now I would like to delete it but it is impossible.

When I try to delete it, I get a message to confirm I realy want to delete the account. I click on yes, and nothing happens. If I do this twice, then the name of the account disappear, but the icon is still visible. When I restart my computer, it's like nothing happened.

Also, I can't change the password or connect to this account.

Thanks for helping me,

François

p.s. I created another account recently and I have no problem connecting to it, changing the password or deleting it.

iMac, Mac OS X (10.5.4)

Posted on Sep 30, 2008 8:38 PM

Reply
10 replies

Sep 30, 2008 9:34 PM in response to FrançoisL

don't know why it's not working. let's try doing it from terminal.

run the following terminal command (copy and paste please)
\\
sudo dscl . delete /users/username
\\
instead of username put short user name of the user you want to delete. it's the same as the name of that user's home directory in /users folder.
You'll have to enter your admin password 9which you won't see). that's normal.

if the command works run the following terminal command (again, copy and paste please).
\\
sudo rm -rf /users/username
\\

That will delete that user's home directory. That's it.

Oct 1, 2008 7:49 AM in response to V.K.

Thanks for reply.
First of all, I can't find the short username, I don't remember what it is and there is no information about this account in /users forlder.
I tried to delete it using the full name and I got this massage

<main> delete status: eServerSendError
<dscl_cmd> DS Error: -14740 (eServerSendError)

Is there any other thig I can do?
Thanks for your help!

Oct 1, 2008 10:26 PM in response to FrançoisL

hmm, if the home directory is gone, that means you mostly succeeded in deleting the account. we really need to find the short name of that account to delete it.
try this.

go to system preferences->accounts, unlock the lock at the bottom and go to login options. enable fast user switching and set view as "short name" next to fast user switching. then if you go to fast user switching menu, all users should be listed by short user names. read off the one you need and follow the advice from my earlier post.

Oct 2, 2008 8:57 AM in response to FrançoisL

No, don't delete root!!! That's the superuser account and it must be present on the computer. this is most definitely not the account you made it yourself. I have no idea how you managed to log in as root as it shouldn't show up in the list of users but your computer is now seriously skrewed up. It can not function properly without a root account present. we need to get it back. there are two ways to deal with this

1. you can do an [archive and install|http://support.apple.com/kb/HT1710?viewlocale=en_US]. that should fix everything.
2. we can try to recreate the root account by hand. I've never done it but we can try. to do th latter you need to boot into single user mode and do it from there.

reboot and hold command+s at the chime. black screen with some white text will come up. at the prompt enter the following commands (one command per line)

mount -uw /

launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist

dscl . create /users/root

dscl . create /users/root GeneratedUID FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000000


(make sure you enter this one correctly).

dscl . create /users/root NFSHomeDirectory /var/root

dscl . create /users/root PrimaryGroupID: 0

dscl . create /users/root RealName "System Administrator"

dscl . create /users/root UniqueID 0

dscl . create /users/root UserShell /bin/sh

Make sure you enter the commands EXACTLY as given. you might want to print out the instructions first.
after all this is done enter

reboot

The computer will restart and boot normally. This is a rather lengthy and complicated procedure so it might be easier to do an archive and install but I wanted to give you this option.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

I can't delete a user account

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.