[desktop-discuss] How to get a user's real home directory when using automount
Brian Cameron
Brian.Cameron at Sun.COM
Thu Mar 27 10:43:36 PDT 2008
Joerg/Others:
I want to thank everybody for the suggestions of how to best get the
user's $HOME directory information on a zones machine. I was working
on this because the JDS QA team filed a bug (bugster 6628566) which
suggested gnome-cleanup work this way. They provided a sample script
which worked as I described. I wanted to touch base with more experts
to get a better idea of how it should work. I think, based on the
responses so far, I have some better ideas.
However, in this discussion it is more clear to me that this bug
report doesn't seem to have a strong use case. As has been pointed out
by several people, a username is not necessary a unique user in
different zones, many setups would share the same $HOME directories
across zones, etc.
Therefore, I am going to ask the bug submitter to further flesh out
real use-cases and answer the questions raised in this mail thread
before changing gnome-cleanup.
Thanks,
Brian
>> I am trying to modify the gnome-cleanup script (refer to "man
>> gnome-cleanup) so it will work in a zones environment. I want to make
>> it work so that if you run it as root, you can specify a userid, then it
>> will clean away the user's GNOME configuration files in all zones.
>
> Do you have a specific zone-based setup in mind where this would be
> useful? I'd suppose that in most cases multiple zones would either share
> home directories or else an identical user name in multiple zones may
> refer to different real users.
>
> I any case separate home directories usually indicate separate
> (different) configurations, so I'd expect simultaneous cleanup to be a
> rare occasion.
>
> At first sight a simple -z zone option for gnome-cleanup looks useful
> for administrators, but I would think that this should be done via
> zlogin. OTOH administrative gnome-cleanup done by user name may not be a
> good idea in the first place, because in general local administrators
> don't have appropriate access to network based resources. Maybe it would
> be a better idea to have a parameter to pass the home directory location
> to gnome-cleanup, so admins can determine the configuration to clean up
> as appropriate, even if the host/zone the home directory resides on has
> a different view of it (and of the user account) than the host/zone from
> which the user logs in.
>
>> [...] I then try to access the user's home
>> directory by accessing:
>>
>> $ZONE_PATH/root/home/userid
>>
>> However, this directory doesn't exist because the real user's
>> home directory is $ZONE_PATH/root/export/home/userid.
>
> That is a very specific setup.
>
>> It seems
>> that this gets mapped to $ZONE_PATH/root/home/userid by
>> /etc/auto_home.
>>
>> Is there any way (short of parsing the /etc/auto_home file
>> directly)
>
> That surely wouldn't work. You may have automounter maps from a remote
> name service involved (which may in turn be configured per-zone). You
> may have executable automounter maps. You can encounter networked
> resources you should leave alone (or can't get to) anywhere in the
> resolution.
>
>> to figure out what the user's $HOME directory really
>> is when the mounts are not yet setup? Or is there a way to
>> cause the mounts to get set up so that the
>> $ZONE_PATH/root/home/userid directory will exist? Or is there
>> a better way to achieve what I am trying to do?
>>
>
> I'm not sure you want to achieve the right thing.
>
> - Joerg
>
More information about the desktop-discuss
mailing list