or Connect
AppleInsider › Forums › General › Genius Bar › Two identical "Users" folders are appearing!
New Posts  All Forums:Forum Nav:

Two identical "Users" folders are appearing!

post #1 of 31
Thread Starter 
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?
post #2 of 31
Yikes! That's strange. Just do what I do when OS X acts up - restart in OS 9, and delete everything!

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.
post #3 of 31
Thread Starter 
No, they're identical but they occupy the same space on the hard drive. Anything I do to one of them is done to the other. If I were to delete the contents of one of them, I'd end up getting rid of the other one too. I have no idea why, but it doesn't take up any extra room to have two Users folders vs. one, but it looks quite strange.
post #4 of 31
Try open up the NetInfo manager in the Utilities folder.

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.
Kappa Rho Alpha Theta Zeta Omega Nu Epsilon
Reply
Kappa Rho Alpha Theta Zeta Omega Nu Epsilon
Reply
post #5 of 31
Thread Starter 
I checked with NetInfo Manager. No other users with the same directory, and I only had one Home directory listed.

I did see a couple that looked strange though - one named "nobody" and one named "unknown." What might those be?
post #6 of 31
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.
post #7 of 31
Quote:
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.
Kappa Rho Alpha Theta Zeta Omega Nu Epsilon
Reply
Kappa Rho Alpha Theta Zeta Omega Nu Epsilon
Reply
post #8 of 31
Quote:
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.
post #9 of 31
Quote:
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)...)
My brain is hung like a HORSE!
Reply
My brain is hung like a HORSE!
Reply
post #10 of 31
Quote:
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?
post #11 of 31
Thread Starter 
I'm not sure how to log in as root. I have done some tinkering, but only through changing permissions, using TinkerTool to show hidden files, or using the terminal for things like sudo rm. But I haven't really gotten into the nitty-gritty of UNIX.

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?
post #12 of 31
Man, there are so many layers of things that could be going wrong here... oy.

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!
My brain is hung like a HORSE!
Reply
My brain is hung like a HORSE!
Reply
post #13 of 31
Thread Starter 
I don't know what you just said... man, this is quite a problem for just a little duplicate.

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.
post #14 of 31
i thought hard links could only go to files, and not folders. if so, it would be quite strange for someone to have hard linked all of luca's home into a new directory.

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?
post #15 of 31
to check for a link (I though you could only hardlink files and not dirs)
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.
post #16 of 31
<edmcmahon>You are correct, sir!</edmacmahon>

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.)
My brain is hung like a HORSE!
Reply
My brain is hung like a HORSE!
Reply
post #17 of 31
Quote:
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.
post #18 of 31
Thread Starter 
dobby, I just tried what you said. First I tried putting the $ signs in but it didn't work so I assumed you put those in for some unknown techie reason but anyway I eventually got it to display this:

Code:

drwxrwxr-t 6 root wheel 204 Aug 30 03:49 Users
post #19 of 31
Thread Starter 
Francis, now that I'm back at home with my external hard drive (which has OS 9 on it) and all my CDs I can try that out. My guess is that OS 9 won't know what a hard link is, and therefore it'll only display one Users folder. But it's worth a try.

I will also try a disk repair.
post #20 of 31
Thread Starter 
I booted into OS 9 to see if I could find both Users folders. As I suspected, only one appeared. So it had to be an OS X problem.

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.
post #21 of 31
Yeah, the thing we said to do first.

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?)
My brain is hung like a HORSE!
Reply
My brain is hung like a HORSE!
Reply
post #22 of 31
Quote:
Originally posted by Luca Rescigno
dobby, I just tried what you said. First I tried putting the $ signs in but it didn't work so I assumed you put those in for some unknown techie reason but anyway I eventually got it to display this:

Code:

drwxrwxr-t 6 root wheel 204 Aug 30 03:49 Users


The $ is the command line prompt.
My brain is hung like a HORSE!
Reply
My brain is hung like a HORSE!
Reply
post #23 of 31
Quote:
Originally posted by francisG3
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.

So you're just guessing about stuff and telling people to do stupid things that could destroy valuable data?

And I guess you wouldn't of cared if your "advice" caused Luca to lose a few year's worth of work?
post #24 of 31
Quote:
Originally posted by Spart
So you're just guessing about stuff and telling people to do stupid things that could destroy valuable data?

And I guess you wouldn't of cared if your "advice" caused Luca to lose a few year's worth of work?

Listen Spart - quit being a jerk. I'm just trying to be helpful. That's what these forums are for. Did I say that was the answer? No. I said it's my best guess. It's people like you who destroy the spirit of these forums

Here's your new job "Spart":

1. Patrol this forum.
2. Whenever someone has a problem, find people who are trying to helpful, but give incorrect advice.
3. Give all of them a rude post, kind of like the one you did for me.

Wouldn't that be fun?
post #25 of 31
Could you *both* lighten up? Jeez.

francis, your suggestion was well-intentioned, but could have resulted in really bad effects, and wasn't *really* put forth as "Well I'm not really sure, but..." Instead, it was: "Just do what I do..." which could sound rather authoritative to a neophyte. Which is why we jumped in to provide an alternate approach.
My brain is hung like a HORSE!
Reply
My brain is hung like a HORSE!
Reply
post #26 of 31
Just to add my 2 cents a little late...

I also observed recently that I had two user folders. I run 10.2 on a multiuser machine. When I'm done I boot into OS9 for others to work in. So the systems get witched around a lot. Also, I work off a firewire drive most of the time, so i don't actually use my home folder much directly other than for e-mail etc.

Well, the sad news is I never did anything about the double home folder and just yesterday the HD crashed big time. I've used TechtoolPro, Disk Warrier and Apples Dsik tools without success. the directory is completely screwed and I can't get anything off the drive.

I'm not sure if the double home folder was an initial symptom, but if anyone reads this take note of how Luca fixed his Mac and how mine crashed and burned.
post #27 of 31
Thread Starter 
You have to be more specific, Carson... I had two identical "Users" folders. The "luca" (Home) folder within was not duplicated.

So if you looked at the contents of /Macintosh HD/ you'd see Applications, System, Library, Games, Users, and Users. But if you looked at the contents of /Macintosh HD/Users/ you'd see Home and Public, and that's it.

Did you have duplicate Home folders or duplicate Users folders? You said Home once and Users the other time in your post.
post #28 of 31
How about another afterthought?

Quote:
Originally posted by Kickaha
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.)

First off, isn't one of Unix's ground principles: "a file is a file is a file"? As in: a file is a file, a directory is a file, a device is a file, they are just different kinds of file? May have thrown OS X in a loop, that one.

Second, I believe I read that deleting one hard link will not delete the file per se, it will only do so if that hard link was the LAST hard link referencing the file (of course, the file is then, after deleting the last hard link, still not deleted. It's still sitting on your drive, there's just no one who knows it. Unless of course you were paranoid and deleted in Terminal using rm with the -p flag.
post #29 of 31
Quote:
Originally posted by der Kopf
Second, I believe I read that deleting one hard link will not delete the file per se, it will only do so if that hard link was the LAST hard link referencing the file (of course, the file is then, after deleting the last hard link, still not deleted. It's still sitting on your drive, there's just no one who knows it. Unless of course you were paranoid and deleted in Terminal using rm with the -p flag.

Yes. To be more precise: hard links are a reference counting mechanism added to the normal one-to-one mapping used in most disk allocation table lookup schemes. Creating a file creates one reference to that data. Making a hard link just adds another reference to the same space on the disk. Deleting a hard link just removes a reference. When you remove the last reference to the allocation blocks, you 'delete' the file by losing any pointers to it. In 'normal' situations, there's just one reference made when the file is created, and one reference (the last one) removed when the file is 'deleted'.
My brain is hung like a HORSE!
Reply
My brain is hung like a HORSE!
Reply
post #30 of 31
Quote:
Originally posted by Luca Rescigno
You have to be more specific, Carson... I had two identical "Users" folders. The "luca" (Home) folder within was not duplicated.

So if you looked at the contents of /Macintosh HD/ you'd see Applications, System, Library, Games, Users, and Users. But if you looked at the contents of /Macintosh HD/Users/ you'd see Home and Public, and that's it.

Did you have duplicate Home folders or duplicate Users folders? You said Home once and Users the other time in your post.

My bad, sorry. I had duplicate "Home" folders. I don't know why. As I said, I really never go in my home folder since I work from an external drive. Consequently i don't know how i would have inadvertantly duplicated it. Maybe someone managed to duplicate it, or maybe it was the beginning of the meltdown of my volume directory.
post #31 of 31
Quote:
Originally posted by Kickaha
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.

Hard links to directories are not uncommon:
"."
".."
But that's about it. No other hard links are permitted on OS X as far as I know. There are some UNIX flavours where root can actually create such hard links, you can sometimes bypass ln and use link(2) directly, but it doesn't seem to be possible on OS X.

As for why this isn't permitted: If it is allowed to make hard links to directories, you can create cycles which are hard to detect and lead to all sorts of problems. Also, if you can have several references to a directory, which one would be the parent? What would .. point to? Even though there may be good solutions, they are not trivial. Since there are hardly any benefits from this, it was decided to simply not allow it.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Genius Bar
AppleInsider › Forums › General › Genius Bar › Two identical "Users" folders are appearing!