FG
💻 Software

Adjusting $PATH in /etc/profile does not affect root

Fresh5 days ago
Mar 15, 202611731 views
Confidence Score0%
0%

Problem

I added a directory to in . This works for my user account but not for root. It's easy to add it to my but I would like to understand what's wrong. It's a mostly unmodified Debian 6 so I think my changes should do the trick. Here is my : Edit: The path I added is the . Here is what tells me:

Error Output

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "`id -u`"…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Adjusting $PATH in /etc/profile does not affect root

Low Risk

You need to run a login shell (or run a non-interactive shell, but that's not what you want) to load . Use or in case of root to do this. is the same as or and makes the shell a login shell.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment