Duplicate /library/ made by mistake

I need some help. My 70+ year old mom called in a panic, as it seems she has created a duplicate /library/ folder. Since this has happened she can log into her account (she has admin permissions), but can not connect to the internet, email or anything else. I am guessing that since there are two /library/ folders it can't locate items to run these. I am 200 miles away trying to troubleshoot for her. What can I do, short of reinstalling the OS? Any suggestions would be great.

Her system: iMac G5 intel, OS 10.4.11

Appreciate your help in advance.

iMac G5, Mac OS X (10.4.11)

Posted on Oct 21, 2008 9:00 AM

Reply
15 replies

Oct 21, 2008 9:30 AM in response to blairmom

User uploaded file
To The Apple Discussion Boards! User uploaded file

Delete the 2nd library folder.
DO NOT EMPTY the trash *yet.*
Repair permissions.
Restart the computer.

If everything checks out after the restart, then your mother can empty the trash.

If problem has not gone away, then mom will need to search for duplicates by using Spotlight. There are 3rd party duplicate file finders but, lets not cross that road unless we have to.........



User uploaded file

Oct 21, 2008 9:25 PM in response to blairmom

Here's what happens. I assume you are talking about the library folder the users Home Director. I assumed the library folder is not in the trash.

Mac OS X expects the library folder to be around at all times. Should the library folder disappear, Mac OS will create a new library folder. This rules out fixing the problem from your own account.

You need to decide whether you want to use the normal graphical interface or to use a terminal commands. Both approaches could corrupt your system. What you need to do is to define the root account or create a new administrator account from which you can use a terminal commands

Here is how to activate the root account.
The user root is the Super user and does not have to worry about all these permissions. Root is a dangerous user cause you can destroy your system with it.
http://support.apple.com/kb/HT1528

here is an overview of the terminal commands . Lets assume that the problem account has a short user name of mac.
Macintosh-HD -> Applications -> Utilities -> Terminal

#be very careful from Terminal. You can trash your entire system when you do a sudo bash. When done, enter exit

# typed in your login password from the current account.
# Your password will not appear when done press enter.
mac $ sudo bash
Password:

cd /Users/mac
#the ls command is for li st
# l is long
# F is type of file where / is directory
ls -lF L*
mv -i Library Library-was-new
mv -i Library-good Library





Robert

Oct 22, 2008 8:19 AM in response to rccharles

Just to clarify - it's her root level library folder.

The name changed to Library 1 and the "new" folder is called library. It contains a cache folder and maybe two other items. This is the folder I need to get rid of I believe. I have worked w/macs for a while, but this one stumps me. Will the terminal commands you provided help for this issue?

Oct 22, 2008 12:09 PM in response to blairmom

Robert's commands will need some modification.. The biggest problem, as I see it, is that you will be unable to copy and paste, since you'll be at the other end of a phone line. You will need to be very careful, paying attention to spaces and punctuation, and remembering that everything is case-sensitive.

So, in Terminal, type carefully, with a return at the end of each line:
sudo mv /Library /Library_new
sudo mv "/Library 1" /Library

After the first return, you will be prompted for your password. This is not echoed back (not even asterisks) for security reasons: just type it and press return.

If you haven't used 'sudo' before, you will receive a little lecture before being prompted for the password. Read it and continue.

After the next returns, you will not receive any feedback, unless there was an error. It may be obvious how to correct any error message (by re-typing?) but if not, post back. Note the quotes in the second command: they are necessary because of the space in the filename.

When you've finished, don't bother quitting Terminal, instead restart immediately, after which you can do what you want with the "Library_new" folder.

Oct 22, 2008 6:41 PM in response to Michael Conniff

Ok. I will be trying this during the upcoming weekend and I want to make sure I have all of my questions out of the way. If I read your directions it sounds like I am to combine part of Robert's with yours. So to echo back (please make corrections where I need them):

Enter terminal:
typed in your login password from the current account.
Your password will not appear when done press enter.
mac $ sudo bash
Password:

cd /Users/mac
#the ls command is for list
# l is long
# F is type of file where / is directory
ls -lF L*
sudo mv /Library /Library_new
sudo mv "/Library 1" /Library

After the first return, you will be prompted for your password. This is not echoed back (not even asterisks) for security reasons: just type it and press return.

If you haven't used 'sudo' before, you will receive a little lecture before being prompted for the password. Read it and continue.

After the next returns, you will not receive any feedback, unless there was an error. It may be obvious how to correct any error message (by re-typing?) but if not, post back. Note the quotes in the second command: they are necessary because of the space in the filename.

When you've finished, don't bother quitting Terminal, instead restart immediately, after which you can do what you want with the "Library_new" folder.

Please let me know if I am missing anything or need to change anything. Again, appreciate everyone's help! – Bri

Oct 22, 2008 7:57 PM in response to Michael Conniff

sudo mv /Library /Library_new


I like added to the -i option. Should you accidentally try to overwrite an existing file you will get a prompt to confirm the overwrite.
sudo mv -i /Library /Library_new

-i Cause mv to write a prompt to standard error before moving a file
that would overwrite an existing file. If the response from the
standard input begins with the character `y' or `Y', the move is
attempted. (The -i option overrides any previous -f or -n
options.)



To find out your current short user ID you can use the id command.

#you can use the id command.
id

You could tried this out by creating a new user ID and renaming the library from the G U I user interface.

Robert

Message was edited by: rccharles

Oct 22, 2008 8:32 PM in response to blairmom

mac $ sudo bash
Password:
cd /Users/mac
#the ls command is for list
1. l is long
2. F is type of file where / is directory
ls -lF L*
sudo mv /Library /Library_new
sudo mv "/Library 1" /Library




You have used the sudo command when you are already in root. This appears to work but is redundant. The command sudo bash puts all of the following commands under root until you type exit.

Are you really using the Unix root accounted? An administrator account is a normal account with special privileges. These accounts and all other users are located in /Users

To use the sudo command you need to be running from an administrator account.

I looked into where the root account's home folder if is. on Mac OS X is ID is in /var/root



cd /var/root
pwd
ls -lF L*
sudo mv -i /Library /Library_new
sudo mv -i "/Library 1" /Library


this would be the safest way of proceeding.

Oct 22, 2008 8:39 PM in response to Michael Conniff

When you've finished, don't bother quitting Terminal, instead restart mmediately, after which you can do what you want with the "Library_new" folder.


Why? A normal shutdown will work fine. The root account should not be logged on at present, so you can proceed with any other task you wish. The root Home folder is only used when the root account is logged on. So it will not be in use now.

Oct 23, 2008 1:56 AM in response to blairmom

blairmom wrote:
Ok. I will be trying this during the upcoming weekend and I want to make sure I have all of my questions out of the way. If I read your directions it sounds like I am to combine part of Robert's with yours. So to echo back (please make corrections where I need them):

No, you only need to enter your password once, where I indicated. Forget about the sudo bash and the cd /Users/mac, I gave you all the commands you need.

One other thing: it would be advisable for your mother to Quit all applications other than Terminal before starting this. Probably unnecessary, but who knows?

Oct 23, 2008 1:55 AM in response to rccharles

Robert

I tried to keep the commands that need to be typed to a minimum, since they have to be relayed over the telephone.

Yes, a normal shutdown will work (I'm not suggesting anything else) as long as it is done immediately. Quitting Terminal is one more step that needs to be relayed over the phone. Likewise your "sudo bash". He doesn't need to use ls: he can see what is there in Finder.

Oct 23, 2008 1:08 PM in response to Michael Conniff

I did not advise running these commands from the userid with the problem. Nor do I advise having the problem account running when you're fooling with its directories. Therefore you're going to need a change directory command to move to the directory of of the problem ID or enter the command with the full path. I know that there is redundancy in these commands and but I think that's a good thing.

Is it is easy to recreate this problem. Create a new userid. Change something on the desktop like adding a file or moving an icon. In the Finder go and rename the library folder. Now log off the account. From an administrator account go and fix the problem. Log-on to the now fixed account and see if it work.

I suggest practicing this on a fully backed up system. Well actually my system wasn't fully backed up when I tried this but .... you know how it is.

Oct 23, 2008 1:57 PM in response to rccharles

I need some help. My 70+ year old mom called in a panic, as it seems she has created a duplicate /library/ folder. Since this has happened she can log into her account (she has admin permissions), but can not connect to the internet, email or anything else.


you may have missed diagnosed the problem. Not being able to do e-mail is a symptom of a bad ~/Library because this is where Mac OS saves your mail.

What she mean by not being able to do Internet? I would think you could do Internet but no bookmarks.

Nor would your desktop look the same. Perhaps she is saying she cannot Find the internet browser. This would be a symptom of the a bad user library. It is possible for the user to rename their library folder. It is not possible for the administrator to rename the System Library folder from the GUI interface without some clever use of the getinfo command. Just because your administrator does not mean you can go and change system files without doing some administrator type things. The administrator does not own system files. The system owns system files.

Is so, there is /Library and ~/Library. Which one was change? ~/Library is the more likely. For example, /Users/mac/Library

you will note ~ means the current users directory path. For example. /Users/mac

There is a mistake with these commands.


The commands are missing a sudo and there is the matter of the /.

There is also the matter of two library folders. There is one library folder /Library and there is a another library folder in the user's account /Users/mac/Library. Which one are we talking about?

But my reading of the problem was that it was the user's Library account. If it was the system's library account that is another problem, which I was not addressing. I don't think the system would run at all if it was this one however.


And you need to make any changes to /Library from a single user mode.
You need to get into single use mode for steps one and two that are listed below.
This page will tell you how to get into single user mode.
http://www.securemac.com/macosxsingleuser.php

Basically, you hold down the command-s key then powering on your machine. The command key has a little apple symbol on the lower left. It is between the alt/option key and the space bar. On a PC keyboard, it will be the windows key, I think.

1) You can change the password on an account. ( Do you know Unix. You are in a Unix single user console. ) The setup commands you need should be listed on the screen. For Mac OS 10.4.11, the commands are:

# Type the follow two instructions to accessing the startup disk in read/write:
/sbin/fsck -fy
/sbin/mount -uw /
cd /
pwd
ls -lF L*
mv -i Library Library_new
mv -i "Library 1" Library



This commands are for a user account...

run these commands from an administrator account that is not the problem account.

Macintosh-HD -> Applications -> Utilities -> Terminal
cd /var/root
pwd
sudo ls -lF L*
sudo mv -i Library Library_new
sudo mv -i "Library 1" Library


It is a good that people are reviewing these commands. It is easy to make a mistake.

Than here is what these commands maybe:
cd is change directory
pwd is a print working directory
ls is list
sudo is Super user do
mv is move

for cryptic comments you can always uses the manual command which is man. for example:
man mv

Message was edited by: rccharles

Message was edited by: rccharles

Oct 23, 2008 2:07 PM in response to blairmom

blairmom wrote:
Just to clarify - it's her root level library folder.

The name changed to Library 1 and the "new" folder is called library. It contains a cache folder and maybe two other items. This is the folder I need to get rid of I believe. I have worked w/macs for a while, but this one stumps me. Will the terminal commands you provided help for this issue?


There is a caches folder in both places.

Robert

Message was edited by: rccharles

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.

Duplicate /library/ made by mistake

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