<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>14078</bug_id>
          
          <creation_ts>2008-01-18 15:35:15 +0300</creation_ts>
          <short_desc>Document -l (or bring su in line with D****n)</short_desc>
          <delta_ts>2012-05-28 19:49:04 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>su</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>23700</dependson>
          <blocked>77</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrey Rahmatullin">wrar</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>dottedmag</cc>
    
    <cc>glebfm</cc>
    
    <cc>kharpost</cc>
    
    <cc>ldv</cc>
    
    <cc>led</cc>
    
    <cc>mike</cc>
    
    <cc>placeholder</cc>
    
    <cc>vt</cc>
    
    <cc>vvk</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>61363</commentid>
    <comment_count>0</comment_count>
    <who name="Andrey Rahmatullin">wrar</who>
    <bug_when>2008-01-18 15:35:15 +0300</bug_when>
    <thetext>ALT Linux su(1) keeps running user&apos;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&apos;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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61412</commentid>
    <comment_count>1</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2008-01-19 00:53:59 +0300</bug_when>
    <thetext>Yes, ALT Linux su(1) and Debian su(1) differ.
So, what do you suggest?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61413</commentid>
    <comment_count>2</comment_count>
    <who name="Mikhail Gusarov">dottedmag</who>
    <bug_when>2008-01-19 00:55:27 +0300</bug_when>
    <thetext>Документировать, что происходит с окружением с - и без него.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61672</commentid>
    <comment_count>3</comment_count>
    <who name="Sir Raorn">raorn</who>
    <bug_when>2008-01-21 20:43:59 +0300</bug_when>
    <thetext>Т.е. толпы румяных линуксоидов не понимают что такое &quot;login shell&quot; и чем он
отличается от обычного интерактивного?  И при чём тут вообще su в таком случае?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61673</commentid>
    <comment_count>4</comment_count>
    <who name="Andrey Rahmatullin">wrar</who>
    <bug_when>2008-01-21 20:49:22 +0300</bug_when>
    <thetext>(In reply to comment #3)
&gt; Т.е. толпы румяных линуксоидов не понимают что такое &quot;login shell&quot; и чем он
&gt; отличается от обычного интерактивного?
Да. Я, например.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61674</commentid>
    <comment_count>5</comment_count>
    <who name="Sir Raorn">raorn</who>
    <bug_when>2008-01-21 20:53:20 +0300</bug_when>
    <thetext>(In reply to comment #4)
&gt; Да. Я, например.

man `basename $SHELL`, раздел INVOCATION или что-то в этом роде.  Что при этом
будет происходить с окружением зависит от шелла и его стартовых скриптов, а не
от su...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110547</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2010-07-12 22:49:26 +0400</bug_when>
    <thetext>(In reply to comment #3)
&gt; Т.е. толпы румяных линуксоидов не понимают что такое &quot;login shell&quot; и чем он
&gt; отличается от обычного интерактивного?  И при чём тут вообще su в таком случае?
При том, что всю документацию не перечитаешь и возможность полагаться на привычки помогает примерно как кэш L1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>131504</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2012-05-28 19:34:24 +0400</bug_when>
    <thetext>Ну или хоть Url: починить, нынешний 404... подсказывают про http://www.linux-pam.org/pre/applications/</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>