Code : Tout sélectionner
export PATH=$PATH:/sbin:/usr/sbin
Code : Tout sélectionner
export PATH=$PATH:/sbin:/usr/sbin
Code : Tout sélectionner
~ echo $PATH
/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/sbin:/home/arnaud/bin
Deciding what things go into "sbin" directories is simple: if a normal (not a system administrator) user will ever run it directly, then it must be placed in one of the "bin" directories. Ordinary users should not have to place any of the sbin directories in their path.
ok , mais même en root je me faisais jeter, j'ai oublié de préciser que la commandeOrdinary users should not have to place any of the sbin directories in their path.
Code : Tout sélectionner
export PATH=$PATH:/sbin:/usr/sbin
Code : Tout sélectionner
root@sdb5-sid:/home/avram# echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
root@sdb5-sid:/home/avram# adduser toto
bash: adduser : commande introuvable
Code : Tout sélectionner
#/usr/sbin/adduser
À mon avis, debian est devenu plus strict dans la gestion des variables d'environnement et il faut utiliser désormais § su - au lieu de § su tout court. Avec § su tout court, nous passons en root, mais nous gardons les variables d'environnement utilisateur tandis qu'avec § su - nous passons en root avec les variables d'environnement root.marcastro a écrit : 31 juil. 2018, 11:16 dans ma sid actuelle toujours à jour les répertoires /sbin et /usr/sbin ne sont plus dans le $PATH avec les conséquences que les commandes adduser, deluser, groupadd, reboot etc......ne sont plus reconnues.J'ai dû ajouter ces répertoires dans mon $PATH avec la commande :
ça le fait chez vous aussi??Code : Tout sélectionner
export PATH=$PATH:/sbin:/usr/sbin
Mimoza a écrit : 03 août 2018, 10:19 Ça va pas changer grand chose pour moi j'utilise toute le temps «su -» :D
apt-listchanges : nouveautés
----------------------------
util-linux (2.32-0.4) unstable; urgency=medium
The util-linux implementation of /bin/su is now used, replacing the
one previously supplied by src:shadow (shipped in login package), and
bringing Debian in line with other modern distributions. The two
implementations are very similar but have some minor differences (and
there might be more that was not yet noticed ofcourse), e.g.
- new 'su' (with no args, i.e. when preserving the environment) also
preserves PATH and IFS, while old su would always reset PATH and IFS
even in 'preserve environment' mode.
- su '' (empty user string) used to give root, but now returns an error.
- previously su only had one pam config, but now 'su -' is configured
separately in /etc/pam.d/su-l
The first difference is probably the most user visible one. Doing
plain 'su' is a really bad idea for many reasons, so using 'su -' is
strongly recommended to always get a newly set up environment similar
to a normal login. If you want to restore behaviour more similar to
the previous one you can add 'ALWAYS_SET_PATH yes' in /etc/login.defs.
-- Andreas Henriksson <andreas@fatal.se> Fri, 03 Aug 2018 10:52:22 +0200
Code : Tout sélectionner
/sbin:/usr/sbin