Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: Repair a user/group Finder crashing issue' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Repair a user/group Finder crashing issue
Authored by: Hal Itosis on Dec 12, '07 02:03:22PM
>This is because in older versions of Mac OS X, users belonged to their own private groups
> with the same ID number as the user (e.g., 501/501). But in Leopard, users now have
> a primary group membership of staff (20).

All pre-Panther cats (Jaguar, etc.) had users' files and folders in the staff group.
So this is not anything new. It may be that Leopard has *reintroduced* this to
make "sharing" a lighter task... but Panther used the '501/501' scheme as part
of the enhanced security features it promoted (shadow passwords, etc).

What's really happened here is that -- due to the demise of Net Info and the
final move to Directory Services -- some users using some upgrade paths had
some problems (with their accounts getting converted properly). Their special
private 'group' simply didn't make the trip. [Whether this is a bug on Apple's
part, or maybe the users backed up to a disk where ownerships were ignored,
or both, or something else... isn't entirely clear.

What is clear is that there is an alternative (as robg linked to) to simply create
the missing group. Somehow though, I don't think their command sequence
is the best solution yet, because: there's no provision to link our group name
to any *gid* number. [I wish some server gurus here would post about this.]

Anyway... here's my best attempt thus far:

### create a group with the same name & number as user/uid: 

 sudo dscl . -create /Groups/`id -un` Password \*
 sudo dscl . -create /Groups/`id -un` PrimaryGroupID `id -u`
 sudo dscl . -merge /Groups/`id -un` GroupMembership `id -un`
 sudo dscacheutil -flushcache

 sudo dscl . -create /Users/`id -un` PrimaryGroupID `id -u`
 sudo dscacheutil -flushcache

As the O.P.'s script suggests, realize that: those commands I posted should be pasted into
Terminal (one-by-one) as they are... and *not* saved as a script which gets run with sudo.

If that were done, many variables would execute with values of '0' instead of '501'.

Comments/corrections welcome.

-HI-


[ Reply to This | # ]
10.5: Repair a user/group Finder crashing issue
Authored by: johnsawyercjs on Jan 23, '08 07:25:54PM

Hal Itosis says:

"As the O.P.'s script suggests, realize that: those commands I posted should be pasted into Terminal (one-by-one) as they are... and *not* saved as a script which gets run with sudo."

I don't see any suggestion in the original post that implies (at least to me) that the commands you supply need to be pasted into Terminal (though I believe you when you say your commands need to be pasted in)--where's the connection? The script in the original post says to save the script shown there as an executable, and mentions nothing about running it line by line from Terminal. I see the line "must be executed as an admin user (no sudo)", but I'm still puzzled.



[ Reply to This | # ]