On 0, ThanhVu Nguyen <thanhvunguyen@psu.edu> wrote: > > > So where is the $PATH changed when doing plain su (without the > > hyphen)? > > > > Right, that's my original question - how did Debian make it so when > just do su , the $PATH changes and include /sbin , /usr/sbin etc. In > other distro (Redhat), I would need to do su - Go RTFM. man su he say: The current environment is passed to the new shell. The value of $PATH is reset to /bin:/usr/bin for normal users, or /sbin:/bin:/usr/sbin:/usr/bin for the super user. This may be changed with the ENV_PATH and ENV_SUPATH definitions in /etc/login.defs. When using the -m or -p options, the users environment is not changed. Regards Tom -- Tom Cook Information Technology Services, The University of Adelaide Classifications of inanimate objects: Those that don't work, those that break down, and those that get lost. Get my GPG public key: https://pinky.its.adelaide.edu.au/~tkcook/tom.cook-at-adelaide.edu.au
Attachment:
pgp05gI7pwlJr.pgp
Description: PGP signature