Re: su/PATH & newgrp/HOME
Kent Howard wrote:
>
> 1) Is it just me or does su set the PATH to a default and forget
> the currently set one? Is this intentional?
it depends on invocation (and thoug is intentional): you may set a complete
su-environmen with "su -" or just change your effective user id with "su",
see "man su"
> 2) newgrp unsets the HOME environment variable.
huh, what's that? that makes me wonder.. moment, i'll check.
manpage says your current environment is kept, which it actually doesn't
with $HOME. doing "newgrp -" (as you also do with su) reinitializes your
env and there you go with $HOME. i guess: newgrp starts a new subshell and
when $HOME is not exported, you loose it in that subshell unless you force
reinitialisation. seemes to be intentional as with su.
gerhard
Reply to: