| Summary: | sys-apps/baselayout-2.4.1: empty PATH after using su/sudo | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Michał Górny <mgorny> |
| Component: | Current packages | Assignee: | William Hubbs <williamh> |
| Status: | RESOLVED INVALID | ||
| Severity: | critical | CC: | base-system, floppym, herrtimson |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
I can't reproduce this. Can you share your sudoers file? Also, if you have secure_path enabled (it is enabled by default), the default value of PATH gets compiled into the sudo binary. Turned out to be PEBKAC. I had an old .bashrc entry that grepped profile files for path end evaled that (probably workaround for some issue). The grep just happened to catch too much post the change. |
After upgrading to new baselayout, env-update, etc.: $ . /etc/profile $ echo $PATH /usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0:[...] [correct] $ sudo bash Password: # echo $PATH [empty] Same after using su. Funny enough, commenting the bit setting PATH=${ROOTPATH} seems to fix it somehow. Direct login to root works fine. /etc/profile.env contains ROOTPATH.