h3. What user ID in Solaris?
C:\Documents and Settings\Admin\Desktop\New Folder\mail.html
Both Solaris and Mac OS assign you a "user ID", a smallish number that can almost always be ignored. Except when you are using NFS.
http://download.java.net/glassfish/eclipse/1.1/glassfish-tools-bundle-for-eclipse-1.1.exe
If you are not using NFS beyond inteconnecting the sibling OSes on your Mac, you want to instruct Solaris to use whatever user ID and group ID your Mac is already using for you. The simplest way to find out is to check your home directory for the numeric codes of its owner. In Terminal:
{noformat}
$ ls -ldn /Users/joeuser
drwxr-xr-x 21 501 501 554 May 25 17:54 /Users/joeuser
{noformat}
Ignore the first and last of the four numbers; the middle two are the user and group numbers.
When you create your Solaris user, set the user ID this way:
* In the Solaris Administration menu, select Users and Groups.
* Select the Advanced tab.
* Enter the numeric user ID in the text field provided.
If you change the user ID after Solaris has already created the user (and especially after you have logged in as that user), there will be a nasty mess to clean up, since all pre-existing files owned by you will still mention the old user ID. I don't recommend making this mess in the first place. Cleaning it up may require expert manipulation of "find" and "chown":
{noformat}
chdir $HOME
find . -user 99999 -exec chown 501 '{}'
{noformat}
h3. Change your MacOS user ID from 501 to your network user ID.
This assumes you have a large network you want to access via NFS, where you already own files under a pre-existing Unix user ID. (It would probably be managed on the network via NIS, aka YP.) It is best to do this earlier, since it involves changing ownership on all your MacOS files. It requires proficiency in the shell. Don't attempt unless you know what you are doing.
Here's what one user did:
* Step zero:
I made sure of my initial UID: open NetInfo Manager,
select 'users' and then 'joeuser'. The 'uid' property was '501'.
(The other trick works too: {{ls -ldn /Users/joeuser}} .)
* Step one:
In System Preferences / Accounts, created a place-holder
user to own stray files. Called it 'admin', gave admin privileges.
* Step two:
Shut down all applications. Opened a terminal window.
Did {{sudo sh}} to get root. Started sweating.
* Step three:
Back in NetInfo Manager, changed the uid of joeuser to _NNNN_
(the uid of my NFS/NIS identity) and then the uid of admin to 501.
* Step four:
In the terminal window, as root, I changed ownership of my files:
{{find /Users/joeuser -user 501 -print0 | xargs -0 chown _NNNN_}}
* Step five:
Log out (Finder Command-Shift-Q) and (holding breath) log in again.
(If something went wrong, I could have logged in a admin...)
* Step six:
Launch Disk Utility and Verify Disk Permissions. Repair as needed.
See also the article "Consistent UIDs may solve file transfer issues":
http://www.macosxhints.com/article.php?story=20051022175850619
I did the ownership change for a few places ($HOME, /Users/Shared),
but not for the whole machine. Superstition, maybe; the public hint is
to change everything; if you do this, you don't need an 'admin' account.
Applications which I had installed earlier are now owned by 'admin'.
Time will tell if this is a problem; if it is, I'll finish changing ownerships.
After this, I mounted an NFS server on my intranet:
* Select Finder, Connect to Server (Command-K) nfs://sam/export
* Browse and select a file in a directory I own.
* Edit / Copy (Command-C) to capture the file's pathname
* File / Duplicate (Command-D) to create a new copy of the file
* Select Terminal, enter {{ls -l}}, then space, Command-V, backspace, star "*", return
This duplicated a file in a directory I already owned, and viola! It had the same owner and permissions as the original:
{noformat}
% ls -l /Volumes/sam/joeuser/tmp/MOZILLA*
-rw-rw-rw- 1 joeuser owner 143 Jan 24 19:40 /Volumes/sam/joeuser/tmp/MOZILLA
-rw-rw-rw- 1 joeuser joeuser 143 Jan 24 19:40 /Volumes/sam/joeuser/tmp/MOZILLA copy
-rw-rw-rw- 1 joeuser owner 70 Jan 24 19:37 /Volumes/sam/joeuser/tmp/MOZILLA~
{noformat}
The group setting is off: The Mac created with group 501 (joeuser) while the NFS server files were previous created with a different group number '10', which the Mac interpreted (randomly) as 'owner'. I fixed this by going back to NetInfo Manager, changing the 'gid' of joeuser to a suitable number, and logging out and in again. The suitable number in this case was '10', which the MacBook apparently does not mind, since its 'owner' group appears to be unused. To be safer, I changed the number of the 'owner' group also. Time will tell....
Don't try this stuff unless you know what you are doing and how to recover if you shoot yourself in the foot.
{gliffy:name=illustration1|space=SunOnMac|page=FileSharing|pageid=7079081|align=center|size=T}
C:\Documents and Settings\Admin\Desktop\New Folder\mail.html
Both Solaris and Mac OS assign you a "user ID", a smallish number that can almost always be ignored. Except when you are using NFS.
http://download.java.net/glassfish/eclipse/1.1/glassfish-tools-bundle-for-eclipse-1.1.exe
If you are not using NFS beyond inteconnecting the sibling OSes on your Mac, you want to instruct Solaris to use whatever user ID and group ID your Mac is already using for you. The simplest way to find out is to check your home directory for the numeric codes of its owner. In Terminal:
{noformat}
$ ls -ldn /Users/joeuser
drwxr-xr-x 21 501 501 554 May 25 17:54 /Users/joeuser
{noformat}
Ignore the first and last of the four numbers; the middle two are the user and group numbers.
When you create your Solaris user, set the user ID this way:
* In the Solaris Administration menu, select Users and Groups.
* Select the Advanced tab.
* Enter the numeric user ID in the text field provided.
If you change the user ID after Solaris has already created the user (and especially after you have logged in as that user), there will be a nasty mess to clean up, since all pre-existing files owned by you will still mention the old user ID. I don't recommend making this mess in the first place. Cleaning it up may require expert manipulation of "find" and "chown":
{noformat}
chdir $HOME
find . -user 99999 -exec chown 501 '{}'
{noformat}
h3. Change your MacOS user ID from 501 to your network user ID.
This assumes you have a large network you want to access via NFS, where you already own files under a pre-existing Unix user ID. (It would probably be managed on the network via NIS, aka YP.) It is best to do this earlier, since it involves changing ownership on all your MacOS files. It requires proficiency in the shell. Don't attempt unless you know what you are doing.
Here's what one user did:
* Step zero:
I made sure of my initial UID: open NetInfo Manager,
select 'users' and then 'joeuser'. The 'uid' property was '501'.
(The other trick works too: {{ls -ldn /Users/joeuser}} .)
* Step one:
In System Preferences / Accounts, created a place-holder
user to own stray files. Called it 'admin', gave admin privileges.
* Step two:
Shut down all applications. Opened a terminal window.
Did {{sudo sh}} to get root. Started sweating.
* Step three:
Back in NetInfo Manager, changed the uid of joeuser to _NNNN_
(the uid of my NFS/NIS identity) and then the uid of admin to 501.
* Step four:
In the terminal window, as root, I changed ownership of my files:
{{find /Users/joeuser -user 501 -print0 | xargs -0 chown _NNNN_}}
* Step five:
Log out (Finder Command-Shift-Q) and (holding breath) log in again.
(If something went wrong, I could have logged in a admin...)
* Step six:
Launch Disk Utility and Verify Disk Permissions. Repair as needed.
See also the article "Consistent UIDs may solve file transfer issues":
http://www.macosxhints.com/article.php?story=20051022175850619
I did the ownership change for a few places ($HOME, /Users/Shared),
but not for the whole machine. Superstition, maybe; the public hint is
to change everything; if you do this, you don't need an 'admin' account.
Applications which I had installed earlier are now owned by 'admin'.
Time will tell if this is a problem; if it is, I'll finish changing ownerships.
After this, I mounted an NFS server on my intranet:
* Select Finder, Connect to Server (Command-K) nfs://sam/export
* Browse and select a file in a directory I own.
* Edit / Copy (Command-C) to capture the file's pathname
* File / Duplicate (Command-D) to create a new copy of the file
* Select Terminal, enter {{ls -l}}, then space, Command-V, backspace, star "*", return
This duplicated a file in a directory I already owned, and viola! It had the same owner and permissions as the original:
{noformat}
% ls -l /Volumes/sam/joeuser/tmp/MOZILLA*
-rw-rw-rw- 1 joeuser owner 143 Jan 24 19:40 /Volumes/sam/joeuser/tmp/MOZILLA
-rw-rw-rw- 1 joeuser joeuser 143 Jan 24 19:40 /Volumes/sam/joeuser/tmp/MOZILLA copy
-rw-rw-rw- 1 joeuser owner 70 Jan 24 19:37 /Volumes/sam/joeuser/tmp/MOZILLA~
{noformat}
The group setting is off: The Mac created with group 501 (joeuser) while the NFS server files were previous created with a different group number '10', which the Mac interpreted (randomly) as 'owner'. I fixed this by going back to NetInfo Manager, changing the 'gid' of joeuser to a suitable number, and logging out and in again. The suitable number in this case was '10', which the MacBook apparently does not mind, since its 'owner' group appears to be unused. To be safer, I changed the number of the 'owner' group also. Time will tell....
Don't try this stuff unless you know what you are doing and how to recover if you shoot yourself in the foot.
{gliffy:name=illustration1|space=SunOnMac|page=FileSharing|pageid=7079081|align=center|size=T}