| Summary: | Document -l (or bring su in line with D****n) | ||
|---|---|---|---|
| Product: | Sisyphus | Reporter: | Andrey Rahmatullin <wrar> |
| Component: | su | Assignee: | placeholder <placeholder> |
| Status: | NEW --- | QA Contact: | qa-sisyphus |
| Severity: | major | ||
| Priority: | P2 | CC: | dottedmag, glebfm, kharpost, ldv, led, mike, placeholder, vt, vvk |
| Version: | unstable | ||
| Hardware: | all | ||
| OS: | Linux | ||
| Bug Depends on: | 23700 | ||
| Bug Blocks: | 77 | ||
Yes, ALT Linux su(1) and Debian su(1) differ. So, what do you suggest? Документировать, что происходит с окружением с - и без него. Т.е. толпы румяных линуксоидов не понимают что такое "login shell" и чем он отличается от обычного интерактивного? И при чём тут вообще su в таком случае? (In reply to comment #3) > Т.е. толпы румяных линуксоидов не понимают что такое "login shell" и чем он > отличается от обычного интерактивного? Да. Я, например. (In reply to comment #4) > Да. Я, например. man `basename $SHELL`, раздел INVOCATION или что-то в этом роде. Что при этом будет происходить с окружением зависит от шелла и его стартовых скриптов, а не от su... (In reply to comment #3) > Т.е. толпы румяных линуксоидов не понимают что такое "login shell" и чем он > отличается от обычного интерактивного? И при чём тут вообще su в таком случае? При том, что всю документацию не перечитаешь и возможность полагаться на привычки помогает примерно как кэш L1. Ну или хоть Url: починить, нынешний 404... подсказывают про http://www.linux-pam.org/pre/applications/ |
ALT Linux su(1) keeps running user's $PATH (maybe other variables) when invoked without -l. This behavior is different from e.g. Debian and is confusing. Moreover, this behavior (neither default nor with -l) is not documented in any way: By default the user's shell is invoked directly, however, giving the argument flag -, su is instructed to invoke the shell as a login shell. This means that the current working directory will be changed to the home of the new user and the shell's first argument will be prefixed with a -. [...] -, -l, --login Invoke the shell as a login shell. Compare with Debian su(1): The optional argument - may be used to provide an environment similar to what the user would expect had the user logged in directly. [...] 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. [...] -, -l, --login Provide an environment similar to what the user would expect had the user logged in directly.