installer doesn't modify root path

Phil Oertel phillipao at gmail.com
Tue Feb 2 07:30:49 PST 2016


On Tue, Feb 2, 2016 at 7:22 AM, Harald Hanche-Olsen <hanche at math.ntnu.no>
wrote:

> -----Original Message-----
> From: Brandon Allbery <allbery.b at gmail.com>
> Date: 2 February 2016 at 16:06:18
>
> > On Tue, Feb 2, 2016 at 9:57 AM, Harald Hanche-Olsen
> > wrote:
> >
> > > Well, you did not say in the bug report that you were using sudo, so no
> > > wonder it got closed.
> >
> > ? sudo is the recommended way to do this.
>
> Yes, but the way the bug report was phrased, it was very easy to suspect
> that either a root shell had been run using “sudo -i”, or perhaps even by
> enabling the root account and logging in as root – which is definitely not
> recommended, but I have seen this suggestion in the wild – though not
> recently.
>
> > > My own systems are too heavily modified at the moment for me to be
> sure,
> > > but I have a file /etc/paths.d/45-macports containing the two lines
> > >
> > > /opt/local/bin
> > > /opt/local/sbin
> > >
> >
> > This is not standard.
>
> Okay, now I am curious. How does the macports installation manipulate the
> path? As far as I know, the above method is standard, even though it may
> not be what macports does. (If I installed that file there, I must have
> done it because it didn’t work otherwise.)
>
> > I would also suspect a sudoers modification here. The default should
> retain
> > the user's PATH,
>
> That’s what I am finding too, after some experimentation. Even the sudo
> man page agrees, though only if you read it really carefully.
>

Entirely possible. I didn't make any such modification personally, but it's
a work laptop, so I don't know what they've done to the image prior to
giving it to me. Maybe I'll get them to stop whatever it is they're doing
to sudoers. Thanks, Brandon and Harald, this makes a lot more sense than
there being an installer bug :)


> – Harald
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20160202/e6a1de8e/attachment.html>


More information about the macports-users mailing list