Can't trash deleted user's folders...

rhinosaur

Registered
Installed 10.1 this weekend and am very pleased with the fact that I can now stay in X (or at least classic) most of the time. However last night I was creating a user for my wife and had forgot to assign her a password. So after already saving the User settings, I re-opened the User system preference, and attempted to give her a password. Which it wouldn't let me do.

I don't remember exactly what the dialogue box said, but it led me to believe that somehow I would either have to log in as her, or give the original pass before I couldn change it (which there wasn't suppose to be a pass, because I didn't give her one!). So, I figured, easy enough. I'll just delete the user.

Now I have a folder in the Users folder entitled something like "rburney's deleted folder" or something similar, that I cannot trash. It says I'm not allowed to put that file in the trash...it makes no mention of not having enough priveleges, it just says that folder can't be moved. I've managed to throw away the contents (documents, music, movies folders, etc.)...but not the users folder itself. If I attempt to move it to the desktop or some other place, it merely copies it. Any help or suggestions is greatly appreciated...thanks.
 
Ok, here is what you need to do...

First you have to have Root enabled. To do this go to Applications/utilities and open NetInfo Manager. When it is open go up to "Domain" at the top, and hilight "Security" If "Authenticate" is the only thing not greyed out, click that. This will ask for an administrator password, (should be your username/password) Put that in, and click "OK" Then go back to the same place you clicked on "Authenticate" and click on "Enable root user". The it will probably give you an error saying there is no password for Root, click "OK" and put in a password for Root. This should be something easy for you to remember, but hard to guess. It is case sensitive, so you can have upper and lower case, and even numbers... a hard password for root is a must.

Once you have root enabled, go to system preferences, and click on "Log in". From here click on the "Login window" Tab, and make sure "Name and Password entry Fields" has the blue dot in front of it, and not show users in a list one.

After that Go up to the apple, and logout. Then type in "root" in the username, and the password in the password field. Click Log in, and this will allow you to delete that folder. BUT BE CAREFULL! you do not want to always log in as root, its dangerous.

Later...
 
I was hoping I had screwed up somewhere. So, if I'm the admin of the machine and I want to delete a user then that means I have to log in as Root to get rid of their folders? Hmmmm...I think that privelege needs some work.

Thanks for the input, I can at least get rid of that stinkin' folder. I'll have to be more cautious...or just not have any more users...heck, my wife can use the 7500 my daughter inherited as a result of my recent upgrade...G4 867, 60GB, CD-RW, Zip, etc. I like to brag too:D Now if those 17" LCD monitors would just drop in price a little bit...
 
Actually: You can log in as her. All you have to do is type in her user name, then just leave the password field blank. I did this before...if you didn't enter any password at all then there is no password. Easy as that. If that doesn't work then sorry...I am a big stupid head. :)
 
At least to the point that I know what I did wrong that made me want to delete the user.

After creating the user, I failed to supply a password. After opening the User preference panel a second time and put in pass it told me something about the keychain wouldn't accept the new password, that it would use the old one (or something similar). Duh, there's no keychains for that user yet...which I realize later.

Now at this point I should have just logged out and logged in as the user, using the pass that I had just created, but I panicked and didn't completely read the "keychain" message. So I deleted the user and was stuck with the "deleted users" folder which I had to log in as root to get rid of. So had I not jumped the gun in the first place, I wouldn't have been in the situation I was in.

Anyway, I'm just curious if this means that now I have to log in as root if I delete a user to get rid of their folders? That would seem to be strange since Apple doesn't recommend the use of root, at least for normal users (can't imagine what would happen if my dad deleted one of my brothers as a user and couldn't delete his folders...I'd have to tell him to wait till I come see him because he can't do it, he'd be ticked!) Oh well.

It's also worth noting for those who happen upon this thread that once you've enabled root through the NetInfoManager you can just as easily disable it so you can switch back to showing your user list on the log in screen...had to fix that, my wife likes the little pictures.:D
 
Ok, I've got a similar problem. I have a folder of stuff that I own, but I can't chmod, chown, or most importantly delete it. And yes, I am using rm -r deleteme, chmod -R 777 deleteme, and chown -R dougk:staff deleteme. It still won't let me delete it, even under root! :confused:
 
What error is it giving you when you try to delete it? Have you used and/or placed anything into this folder while you were in OS 9? If you did, that could be the problem. If you put a file in there that is locked, you won't be able to delete it (or the folder enclosing it), even with root. There's a program that comes with the Dev Tools (SetFile) that'll let you set/unset OS 9 attributes (like locked, invisible, etc), but if you didn't install the Dev Tools, you'd have to reboot into OS 9 to fix it.

That's all if there's a locked file in there, of course.
 
Originally posted by rhinosaur
Now I have a folder in the Users folder entitled something like "rburney's deleted folder" or something similar, that I cannot trash.
Since I am no Unix whiz kid, I like to use old tricks. ;) Simply boot in Mac OS 9, navigate to the Users folder of your Mac OS X volume, and delete the offending folder. (FYI, Apple says you don't need to remove the old user's folder, since it only uses 16 k or so of disk space.)
 
I could just boot into 9 and remove the folder, I was just curious if I had done something wrong to make it unmoveable. Apple's excuse that you wouldn't want to remove the folder is ridiculous. It looks ugly when you have a nice User folder full of users to have some empty "deleted username" folder hanging around. Oh well, I've learned from my mistakes...thanks guys.
 
Originally posted by rhinosaur
I was hoping I had screwed up somewhere. So, if I'm the admin of the machine and I want to delete a user then that means I have to log in as Root to get rid of their folders? Hmmmm...I think that privelege needs some work.

No, it doesn't need work. In MacOSX, being an admin only means that you can become root, not that you are root. Finder just doesn't seem to have a simple way to let you do a graphical equivalent of sudo to do root-ish things. This is a good thing. We've all done stupid things to our systems that we regretted as soon as we released the mouse button or hit enter. Functionally, Unix and MacOSX are quite a bit more defensive about such things. IMNSHO, Finder should only be root if one has logged in completely as root. And even then, it should nag and nag about how bad a thing it is to be root in Finder. Both Gnome and KDE (on Linux) do this to varying degrees, and it certainly serves as a good reminder to be extra-careful during the session.

I think that the idea around changing ownership of the deleted user's folder is just a courtesy to allow the "admin" user to copy any leftover files out. It does seem a little odd that it couldn't be deleted, but the solution is simple - open a terminal window, go to the /Users directory and issue "sudo rm -rf username\ Deleted" (The "\" is an escape character to allow the inclusion of a space in the file/directory name). For example, if I've created (and later deleted a user named "Bob", and my (administrative) acount is "kenkl" -
Code:
gossamer:/Users:kenkl> ls -l
total 0
drwxrwxrwt   2 root   wheel  264 Feb 25  2001 Shared
drwxr-xr-x  11 kenkl  staff  330 Oct  7 15:18 bob Deleted
drwxr-xr-x  19 kenkl  staff  602 Oct  7 14:38 kenkl
gossamer:/Users:kenkl> rm -rf bob\ Deleted
rm: bob Deleted: Permission denied
gossamer:/Users:kenkl> sudo rm -rf bob\ Deleted
Password: [i]entered the password for [b]kenkl[/b] here[/i]
gossamer:/Users:kenkl> ls -l
total 0
drwxrwxrwt   2 root   wheel  264 Feb 25  2001 Shared
drwxr-xr-x  19 kenkl  staff  602 Oct  7 14:38 kenkl
gossamer:/Users:kenkl>
The idea here is that you don't have to be root or even become root (or boot into OS9, or whatever) to do these things; sudo lets you do root-ish stuff just fine. As an aside, non-Administrative accounts cannot use sudo:
Code:
[gossamer:/Users] bob% ls -l
total 0
drwxrwxrwt   2 root   wheel  264 Feb 25  2001 Shared
drwxr-xr-x  11 bob    staff  330 Oct  7 15:30 bob
drwxr-xr-x  19 kenkl  staff  602 Oct  7 14:38 kenkl
[gossamer:/Users] bob% sudo rm -rf kenkl
bob is not in the sudoers file.  This incident will be reported.
[gossamer:/Users] bob% ls -l
total 0
drwxrwxrwt   2 root   wheel  264 Feb 25  2001 Shared
drwxr-xr-x  11 bob    staff  330 Oct  7 15:30 bob
drwxr-xr-x  19 kenkl  staff  602 Oct  7 14:38 kenkl
[gossamer:/Users] bob%
Bob's been reported! ;)

Sorry to get so long-winded, but I thought that this needed some explaining.
 
Oh, just so you know, the setfile utility, although good, doesn't do it recursively. So, in other words, I'll have to change the permissions of over 100 files. Thank you, no. :mad:
 
Back
Top