| Summary: | /usr/sbin not in the PATH of root | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Denis Bitouzé <dbitouze> |
| Component: | RPM Packages | Assignee: | Mageia Bug Squad <bugsquad> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | lewyssmith, ouaurelien |
| Version: | 8 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | CVE: | ||
| Status comment: | |||
|
Description
Denis Bitouzé
2021-03-05 09:49:27 CET
Hi, thanks reporting this. How do you obtain root privileges? Best use: $ su - # echo $PATH /usr/local/sbin:/usr/sbin:/usr/local/bin:/usr/bin Therefore, urpmi is found on all my systems. Note that this path is displayed on all my systems, even in 3 freshly Virtual Machines installed with Plasma, Gnome or Mate Desktops. To be root, you must use "su -" with a minus (6 key on AZERTY keyboard). https://wiki.mageia.org/en/Never_use_just_su Status:
NEW =>
NEEDINFO Indeed, `su -` instead of `su` did the trick. But, IIRC, `urpmi` was found with just `su` until Mageia 7. (In reply to Denis Bitouzé from comment #2) > Indeed, `su -` instead of `su` did the trick. But, IIRC, `urpmi` was found > with just `su` until Mageia 7. And this is a bug in Mageia 7. /sbin (/usr/sbin) programs must not be in User's path. Now we use a better $PATH for user and for root. Closing this. Status:
NEEDINFO =>
RESOLVED For the record on my M8 system: $ echo $PATH /usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/games:/usr/games:/usr/lib64/qt5/bin yet $ urpmi whatever Dim ond yr uwchddefnyddiwr all osod pecynnau [Only superuser can install pkgs] $ sudo urpmi (or whatever) works fine for all 'su' commands. You need to be in the 'wheel' group for sudo: $ sudo urpmi whatever [sudo] password for lewis: Dim pecyn o'r enw whatever [no pkg of this name] $ su Password: # echo $PATH /usr/local/sbin:/usr/sbin:/usr/local/bin:/usr/bin:/usr/lib64/qt5/bin # urpmi whatever Dim pecyn o'r enw whatever [no pkg of this name] CC:
(none) =>
lewyssmith |