If you are integrating your stand-alone machine into an existing local network, you might find that your local user id is different from your network user ID. In order to access network resources as you, you need a single UID. In this example, you are the user nouchine and your local machine is connected to a netinfo or ldap server called server. |
Read the local UID: |
dscl . -read /Users/nouchine | grep UniqueID uid: 501 |
Read the network UID: |
dscl /LDAPv3/ldap.company.com -read /Users/nouchine | grep UniqueID uid: 2645 dscl localhost -read /NetInfo/root/Users/nouchine UniqueIDuid: 2645 |
Or if you are on NIS: |
ypcat passwd.byname | grep nouchine | cut -d: -f4 2645 |
In this example, your local UID is 501 and your network UID
is 2645. Since these are different, you will not be able to
write to your NFS directories. To make your local UID match
your network UID, perform the following: |
dscl . -change /Users/nouchine UniqueID 501 2645
|
(2) Change the owner of your files from the old UID to the
new one. This needs to be done on every file system that you
wrote to as the old user. At a minimum, this will be
/Users/nouchine and /Library, and you might find others.
|
find /Users/nouchine -user 501 -exec chown 5464 {} \;
|
There are a few files that have the old UID as part of their names: |
change these with: |
mv /.Trashes/501 /.Trashes/5464
|
If these weren't changed to the new UID before, change them now: |
chown 5464 /Library/Caches/*5464*
|
The |
The instructions above handle the UID. You might find that on the remote systems that you belong to certain groups to which you do not belong on the local system. For example, if you are part of the group "autism" on the remote server, but not locally, you won't be able to write to files or directories owned by other members of the group. |
In this case, you will need to create the group locally.
Here the GID has been determined to be 1135. In most cases,
this will be obvious because you will see the GID instead of
the group name when you |
dscl . -create /Groups/autism
|
Make yourself a member. |
dscl . append /Groups/autism GroupMembership nouchine
|