Two identical "Users" folders are appearing!
This is a bug I first noticed maybe two weeks ago. Eventually it just went away. But now it's back, and it won't go away. I have an 800 MHz iBook running 10.2.6 and for some reason there are two "Users" folders. There's only one user for the computer, and besides, it's not like there are two "Home" folders. Anyway, the Users folders are identical in every way, and they don't take up any extra room. I had about 4 GB free on my hard drive before the problem occurred and it hasn't changed since the problem appeared. When I tried putting everything from one of the Users folders in the trash, everything in the other one moved too, so it's like the same item is appearing twice. The other Users folder appears in all three views (Icon, List and Column), but when I switched to Icon view from my main view, Column view, they were on top of each other so it appeared as though there was only one.
Any idea what's going on? Will this just require a restart to fix?
Any idea what's going on? Will this just require a restart to fix?
Comments
Seriously, if you're positive they're identical, move one of them to the trash in OS 9, but don't empty it till your computer's worked right for a day or two.
Take a look in /users. See if there are any other users that have the same home folder as you. Also make sure that your user doesn't have two entries for the home folder. Beyond that, I'm stumped.
That's really odd.
I did see a couple that looked strange though - one named "nobody" and one named "unknown." What might those be?
Just restart in OS 9, if your machine will let you, and delete one of the folders. End of problem.
Don't mean to be sassy - I feel like no one's listening to me.
Originally posted by francisG3
Let me repeat myself. This time, I'll type a little louder.
Just restart in OS 9, if your machine will let you, and delete one of the folders. End of problem.
Don't mean to be sassy - I feel like no one's listening to me.
He did hear you. He said that they are the same thing... what happens to one happens to the other. If he adds a file in one, he adds a file to the other. If he deletes a file in one, it gets deleted in the other.
And those nobody and unknown users are standard system users.
My question is how do symbolic links show up in the Finder? Could it be a symLink? Go into the terminal and type "ls -l /Users", and post what it gives you.
Originally posted by bauman
He did hear you. He said that they are the same thing... what happens to one happens to the other. If he adds a file in one, he adds a file to the other. If he deletes a file in one, it gets deleted in the other.
I give up.
Originally posted by francisG3
I give up.
Good, because your advice here would only trash his /Users folder completely. Sorry, but you're wrong on this one. We heard, we listened, we digested, we said "No thanks."
Luca, have you run a simple Disk Utility check? Try booting into single-user mode and inspecting from the command line. Are both copies still there? Look for a hardlink (not a symbolic link).
Is /Users by any chance being shared? (I've seen some wonkiness with Sharing under MacOS X Server... on one machine, Users refuses to show up in connection panels as anything other than Users(1)...)
Originally posted by bauman
Could it be a symLink? Go into the terminal and type "ls -l /Users", and post what it gives you.
It pretty much sounds like a hard link (standard Unix, two references pointing to the same 'content' on your disk, unlike a soft link -'alias' in macos terms- where you have a reference to another reference -the latter pointing to content on your HD- google up 'unix hard link' or something if you want to know more), which is a bit strange, since I thought OS X didn't handle hard links well (I even tried with the ln command). Although that may very well be the reason of your problems. Do you remember what started it? What programs you installed?
One unelegant solution: copy your entire users folder (preferably with something like Carbon Copy Cloner, to make sure all privileges are transferred correctly), and name it 'luca copy' or something. Then delete the two old folders and then rename the copy to what it was called. This is quite invasive, so you will have to login as root to perform to final two tasks. You could just move all of the stuff to a folder 'luca copy' when logged in as root, that will save you some disk space.
Do you know how to log in as root?
Restarting the computer didn't fix the problem. Right now I'm performing a repair on disk permissions. That might have something to do with it.
Anyway, assuming this permission repair doesn't work, how do I look for a hard link and eliminate it? I am not even quite sure what a hard link is... something like an alias, but it looks like a duplicate?
Okay: hardlink is a symbolic link from heck. It looks like, acts like, sounds like, and tastes like the original. (Don't ask.) Deleting a symbolic link is like deleting a Finder alias... it deletes a little pointer. Deleting a hardlink *deletes the original*. For all intents and purposes, it *IS* the same as the original. (It lets you put 'the same file/directory' at two or more different places in the folder hierarchy.)
That's the disk level.
Then there's the NetInfo level, dealing with share points.
Then there's the Finder, that takes all this info and whips into a UI frappe before serving.
Any one of these layers could be causing this. Start at the bottom and work your way up... disk repair, permissions repair, look for a hardlink, etc, etc. Then peer into NetInfo and see if there's a bogus share point there (try looking in the Sharing section of a Finder Get Info pane for the Users folder first, obviously).
Then we get to the fun stuff.
Did I say oy? Oy.
Oy I say! Oy!
Anyway, the permissions repair has finished and it didn't fix anything. I'll try doing a disk repair once I get back home to my CDs. Now I have to go to class though (hooray for college!).
How do I do all of that stuff? I only understood about half of what you said and I only know how to do about 1/10 of it.
also, rm'ing a hard link doesn't destroy the original file, i think. i dont have access to my mac right now, but in cygwin it don't (i know cygwin aint exactly a real *nix, but its supposed to be pretty darn close).
if deleting a hard link got rid of both it and the original, how would one ever get rid of a hard link once it was created, without destroying the original file?
open Terminal (Applications/Utilities)
In The terminal window
$ cd / (Changes directory to the 'root' or top level)
$ ls -la | grep Users (full directory listing and display only Users)
You should see the following.
drwxrwxr-t 8 root wheel 272 Aug 21 16:19 Users
if you see
drwxrwxr-t 8 root wheel 272 Aug 21 16:19 Users
lrwxrwxr-t 8 root wheel 272 Aug Users -> Users
Then the link is a soft link.
You can remove a softlink of a dir safely.
rm Users
This can't remove the actual dir as you need a -r.
Dobby.
From the ln man page: "A hard link to a file is indistinguishable from the original directory entry; any changes to a file are effective independent of the name used to reference the file. Hard links may not normally refer to directories and may not span file systems."
It's the 'normally' that gets me... I could swear there were maaaaagical ways to produce hard links to directories, but you're right, that's probably not the case here.
Also, you are right that deleting a hard link will not erase the file. Overwriting with a NULL will, however, wipe the contents for all table entries. (Don't ask... bad bug, bad memories, don't wanna talk about it.)
Originally posted by Kickaha
Good, because your advice here would only trash his /Users folder completely. Sorry, but you're wrong on this one. We heard, we listened, we digested, we said "No thanks."
So far no has explained to me why restarting in OS 9, moving one of the user folders to the trash, and restarting in OS X wouldn't work. Everyone's said, "Oh, when he does this, it happens to both," and "Oh, then you'd trash the users folder," and what not.
I understand that in OS X, when you move one, the other will follow. But I'm thinking that in OS 9, you can move one folder, and the other will stay put.
drwxrwxr-t 6 root wheel 204 Aug 30 03:49 Users
I will also try a disk repair.
Then I booted from the CD and did a disk repair. Verification gave me an error that said something along the lines of "Invalid directory count, should be 32 instead of 33" so I assumed that was the problem. Repaired the disk, and now there's no problems. Thanks for all your help everyone, it must have been something a bit more mundane.
francisg3: What Luca said.
OS9 never had to deal with a hardlink in its life, so it would just ignore it. The Finder in OS X manages to deal pretty gracefully with all sorts of things that the ol' Finder ne'er *dreamed* of.
The assumption was: If, in X, there are two directories with the same name in the same location, something is fubared either with the disk layout catalogs (which was the case), or with the semantics of the layout (as with a hardlink). The X Finder will attempt to make nice-nice with the situation, while the old Finder would at best ignore it, if not outright spew bits all over your screen.
In such a case, using the OS 9 Finder to try and fix something that it was never designed to handle is akin to using a Junior Woodchuck pocket knife to repair an F-15 engine... while it's running. Not Advised(tm).
(I do hope that in cases where you boot into 9 to delete offending stuff, you *do* at least attempt to run a disk repair from within X *first*... right?)