--000325557abe76a8e204774cba34 Content-Type: text/plain; charset=UTF-8 Hi, According to the manual: 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 superuser. This may be changed with the ENV_PATH and ENV_SUPATH definitions in /etc/login.defs. So for me when doing a simple "su" invocation the $PATH should be "/sbin:/bin:/usr/sbin:/usr/bin" while "su foouser" should return "/bin:/usr/bin" when /etc/login.defs is not modified. But it is not the case, we unconditionally get "/bin:/usr/bin". Here is a patch that correct this behavior. Cheers, Michel --000325557abe76a8e204774cba34 Content-Type: application/octet-stream; name="su.patch" Content-Disposition: attachment; filename="su.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g1hnotn40 LS0tIHNoYWRvdy9zcmMvc3UuYwkyMDA5LTEwLTMxIDIwOjEyOjUxLjAwMDAwMDAwMCArMDEwMAor Kysgc2hhZG93L3NyYy9zdS5jCTIwMDktMTAtMzEgMjA6MzM6MzIuMDAwMDAwMDAwICswMTAwCkBA IC04NjksNyArODY5LDggQEAKIAogCWNwID0gZ2V0ZGVmX3N0ciAoKHB3ZW50LnB3X3VpZCA9PSAw KSA/ICJFTlZfU1VQQVRIIiA6ICJFTlZfUEFUSCIpOwogCWlmIChOVUxMID09IGNwKSB7Ci0JCWFk ZGVudiAoIlBBVEg9L2JpbjovdXNyL2JpbiIsIE5VTEwpOworCQlhZGRlbnYgKChwd2VudC5wd191 aWQgPT0gMCkgPyAiUEFUSD0vc2JpbjovYmluOi91c3Ivc2JpbjovdXNyL2JpbiIgOiAiUEFUSD0v YmluOi91c3IvYmluIiwKKwkJICAgICAgICBOVUxMKTsKIAl9IGVsc2UgaWYgKHN0cmNociAoY3As ICc9JykgIT0gTlVMTCkgewogCQlhZGRlbnYgKGNwLCBOVUxMKTsKIAl9IGVsc2Ugewo= --000325557abe76a8e204774cba34--