Please hope me!
May 10, 2011 7:12 PM   Subscribe

In Snow Leopard (10.6.7), I changed my UID while logged in as the administrator. When I rebooted, a bunch of stuff changed and a lot of my settings were lost. It says I am the admin, but I can't make any changes or set any permissions.

I was trying to send some files from my laptop to my iMac across the home network, and I read a guide that seemed to say I had to change my UID to something different than the UID of the computer I was getting the files from. They were both 501, so I changed the iMac UID to 503 and rebooted. Now everything seems totally FUBAR. Is it?
Also, I can't get my mouse to right-click anymore. I tried going to the Bluetooth settings to make the computer forget it, but the minus sign is greyed-out.
posted by Demogorgon to Computers & Internet (25 answers total) 1 user marked this as a favorite
 
It would help if you said specifically what commands you ran, and what page's instructions you were following.

The obvious follow on question to what you wrote would be, did you try setting it back?
posted by devbrain at 7:20 PM on May 10, 2011


Response by poster: I didn't do this in the terminal. The way I went about it was that I went to System Preferences>Accounts and then authenticated to make changes, I right-clicked my account and selected "Advanced Options." In the Advanced Options menu there is a pretty hefty warning, followed by a box that says "User ID." This I changed from 501 to 503, and then rebooted.

I'll try to look up the page I was reading, but it was on the computer that I changed the UID on, so I don't have it in front of me. Apart from that, I don't think I interpreted the instructions correctly anyway.
posted by Demogorgon at 7:31 PM on May 10, 2011


Best answer: You hosed your permissions.

Open Disk Utility. Applications>Utilities>Disk Utility
Click your startup disk.
Click the First Aid tab, and then Repair Disk Permissions.
posted by Threeway Handshake at 7:32 PM on May 10, 2011


Response by poster: Oh, and yes I tried to set it back, but I can't right-click! When I get to the Accounts menu, I can authenticate, but I noticed that I couldn't right-click to bring up the Advanced Options menu. That was when I figured out right-clicking didn't work anywhere. And yes, I tried re-enabling that from the System Preferences menu to no avail.
posted by Demogorgon at 7:33 PM on May 10, 2011


Response by poster: You hosed your permissions.

Open Disk Utility. Applications>Utilities>Disk Utility
Click your startup disk.
Click the First Aid tab, and then Repair Disk Permissions.


> Repairing permissions. Estimated time: 42 minutes

Thanks, Threeway Handshake. I'll have to see what this yields, but is it a sure-fire method or should I expect that things will still be screwy even after using Disk Utility?
posted by Demogorgon at 7:38 PM on May 10, 2011


It is pretty much a Sure Thing. It is like the "reboot your windows computer" of Mac OSX problems.
posted by Threeway Handshake at 7:40 PM on May 10, 2011


Further reading.
posted by Threeway Handshake at 7:41 PM on May 10, 2011


If the Repair Disk Permissions doesn't do the trick, look into the command "dscl" which should let you set your uid back from the terminal.
posted by devbrain at 7:41 PM on May 10, 2011


Best answer: On the right click topic; you might try Control+Left Click to see if that works?
posted by devbrain at 7:43 PM on May 10, 2011


Response by poster: Okay, Repair Disk Permissions finished sooner than expected, but it didn't seem to work. I rebooted and everything is still wacky. Ctrl+Left Click does indeed work devbrain (can't believe I didn't try that). My question now would be; do I set the UID back from the Advanced Options pane, or do I do it from the terminal? Would it make any difference?
posted by Demogorgon at 7:48 PM on May 10, 2011


Response by poster: Okay, so I just went ahead and reset the UID from the Advanced Options window in the Accounts menu. I rebooted and everything is back to normal. Thank you both for the halp!
posted by Demogorgon at 7:53 PM on May 10, 2011


I was trying to send some files from my laptop to my iMac across the home network, and I read a guide that seemed to say I had to change my UID to something different than the UID of the computer I was getting the files from.


In fact, it is sometimes helpful to make the UIDs the same, though it's rare to run into even that situation. In my admittedly limited experience with the Unixy background of OS X, I'm hard pressed to think of a situation where you would want them to be different.
posted by Nonsteroidal Anti-Inflammatory Drug at 7:53 PM on May 10, 2011


Response by poster: Yeah, I don't know why, but sharing has always seemed really effed up for me in OS X. Originally, this problem arose because I kept getting a message that said, "You may need to enter the name and password for an administrator on this computer to change the item named 'XXXXX'."

I click Continue and it makes the sound like something transferred, but nothing is there.
posted by Demogorgon at 7:59 PM on May 10, 2011


Best answer: The part of the process that you are missing is dropping down to the terminal and running (as root):

chown -R $USER ~$USER

The reason you had problems is because plain old POSIX file permissions don't store the user name, but the user ID number. And when you changed that, suddenly all the files in ~$USER are no longer owned by the user ID number that $USER has.

(ACL's work differently, and store the user GUID, and thus will survive a user rename/user ID number change. But they won't survive deleting and recreating the user unless you remember to restore the old GUID on the new user)

The only place I've ever seen user ID number matching matter is if you're using NFS. On SMB/CIFS or AFP the user IDs shouldn't matter (because you authenticate as the user ON THE SERVER you want to read/write as; whereas NFS uses the client ID number to figure out server permissions).
posted by sbutler at 8:19 PM on May 10, 2011


Response by poster: Hey sbutler! I saw your responses in this thread, but I couldn't tell if I needed to run the same commands as boombot.
I'm still having the problem with the "You may need to enter the name and password...&c."

I typed this in the terminal:

chown -R $hephaestus1 ~$hephaestus1

...on the computer from which I am sharing the folder. Do I also need to operate as root on the computer to which I am trying to copy?
posted by Demogorgon at 8:29 PM on May 10, 2011


Whoa, whoa, whoa. $USER means replace it with the username in question (just plain old "hephaestus1" in this case). And in any event, the command I gave was to fix permission problems after you change the user ID number. If you changed the user ID back then it's not necessary.

I'm not sure we can help you with all your sharing problems. Maybe if you answer these questions:

On the client machine (machine you are connecting FROM):
- User name
- User ID number

On the server machine (machine you are connecting TO):
- User name
- User ID number
- Owner of the folder you are sharing
- Owner permissions of the folder you are sharing

How you are connecting:
- AFP? SMB? NFS?
- What user name are you typing in (if not NFS)
posted by sbutler at 8:36 PM on May 10, 2011


Also, get the owner/permissions of the folder you are sharing from the SERVER machine. What AFP and SMB present to the client as owner/permissions is useless in this case.
posted by sbutler at 8:38 PM on May 10, 2011


Response by poster: Whoa, whoa, whoa. $USER means replace it with the username in question (just plain old "hephaestus1" in this case)

Oops, mea culpa.

On the client machine (machine you are connecting FROM):
- User name
: from a whoami, it says hephaestus1
- User ID number: back to 501, as per the previous debacle.

On the server machine (machine you are connecting TO):
- User name
: again, hephaestus1
- User ID number: also 501

- Owner of the folder you are sharing
- Owner permissions of the folder you are sharing


These two I'm not entirely sure about. I created the folder yesterday (so hephaestus1 [server side] should be the owner), and the permissions show "Read & Write" for everyone. Those are the permissions reported from the server.

I'm using AFP, this is a Macbook Air connecting to an iMac.
posted by Demogorgon at 8:51 PM on May 10, 2011


Everything looks like it should. You only have one user on each machine, so you can't be connecting as anyone else. It's a mystery we could probably solve in person, but over the internet there's a detail that's not coming through :(
posted by sbutler at 11:57 PM on May 10, 2011


Response by poster: Yeah, I understand. Thanks again to all who helped out! I'll probably call Apple and bug them about it.
posted by Demogorgon at 6:45 AM on May 11, 2011


On the Mac where you changed the UID to 503, how did you do so? Even after you changed your UID, it looks like you need to also change the folder's owner UID to 503. When I've done folder permissions on a mac server, I sometimes run "Chown -R UID Folder" when dealing with permissions because we have users from multiple directories with the same username. You can see a folder's UID owner with "ls -ln"- don't worry about the first set of digits, the second set is the file/folder's owner and the third set is the group owner. We're concerned with the first set of digits here.

For instance, mine is

drwxr-xr-x 45 1921115215 1186792824 1530 Apr 18 07:58 jmd82

My UID is 1921115215- you're will be 501 or 503.

So in your case, I'd use terminal where you're having problems (UID == your user's UID)
cd /Users
sudo chown -R UID YourHomeFolder/

In my case, the chown command (which sets the file/folder ownership) would be:
sudo chown -R 1921115215 jmd82
posted by jmd82 at 6:52 AM on May 11, 2011


Response by poster: On the Mac where you changed the UID to 503, how did you do so?

I don't know, man; like I said I just went, via the GUI, to System Preferences>Accounts, then authenticated, right-clicked my account and selected Advanced Options. A new window came up that shows my UID, UUID, group, account name, home directory, etc. Where it said 501, I highlighted and changed it to 503. After that I rebooted and everything was fuX0r3d.
I'm still a bit lost with the chown commands I need to use to get the "You may need to enter the name and password for an administrator on this computer to change the item named 'XXXXX'." permission problem fixed. Could we take it to mail, maybe? I'd greatly appreciate the help, since Apple wants $50 sawbucks to do the deed.
posted by Demogorgon at 9:01 AM on May 11, 2011


To be clear, when are you getting the "enter thy password" message? Is it when entering the chown command? At the terminal? Someplace else?
Using the chown command does require root privilages- you normally should be able to type in your administrator password, but the UID stuff may have screwed that up. There are ways around this, but it depends on where access issue is.
posted by jmd82 at 9:30 AM on May 11, 2011


Response by poster: I did not change the UID via the terminal, I did it via the GUI, navigating to System Preferences>Accounts, etc. I entered no commands, I did not even open the terminal to do this. Try it yourself on a Mac. Open the System Preferences panel, click on Accounts, there is a little lock emblem in the lower left corner of the window. I clicked the lock and then entered my password. After that I was able to right-click myself in the user list, which gave me the "Advanced Options" drop-down. I clicked that, and that brought me to a window with all the aforementioned information ("A new window came up that shows my UID, UUID, group, account name, home directory, etc.").

you normally should be able to type in your administrator password, but the UID stuff may have screwed that up.

As far as I can tell, the UID problems from before have been fixed. I changed back to 501 from 503 and all my normal settings have returned. The problem I was having initially (that I tried to self-remedy by changing the UID), is that when I connect to my laptop from my iMac via AFP, I try to drag a file from a shared folder (with full Read/Write permissions) to my desktop to copy it. A message comes up that says, "You may need to enter the name and password for an administrator on this computer to change the item named 'XXXXX'." I hit "Continue" and it makes the "boing" sound like something has been copied, but there is nothing there.
posted by Demogorgon at 9:42 AM on May 11, 2011


MeMail sent.
posted by jmd82 at 11:44 AM on May 11, 2011


« Older A World, in a Virtual Land, Far, Far Away Where...   |   Virus? Scam? Stealing my money? Help! Newer »
This thread is closed to new comments.