Changeset cacd76ad


Ignore:
Timestamp:
12/27/2021 12:43:22 PM (2 years ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
11.1, 11.2, 11.3, 12.0, 12.1, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
e2453ed5
Parents:
281a21f
Message:

shadow: stop building su

File:
1 edited

Legend:

Unmodified
Added
Removed
  • postlfs/security/shadow.xml

    r281a21f rcacd76ad  
    134134    -i etc/login.defs                                 &amp;&amp;
    135135
    136 ./configure --sysconfdir=/etc --with-group-name-max-length=32 &amp;&amp;
     136./configure --sysconfdir=/etc               \
     137            --with-group-name-max-length=32 \
     138            --without-su                    &amp;&amp;
    137139make</userinput></screen>
    138140
     
    188190      <parameter>--with-group-name-max-length=32</parameter>: The maximum
    189191      user name is 32 characters. Make the maximum group name the same.
     192    </para>
     193
     194    <para>
     195      <parameter>--without-su</parameter>: Don't reinstall
     196      <command>su</command> because the upstream recommends to use the
     197      <command>su</command> command from <xref linkend='util-linux'/>
     198      when <application>Linux-PAM</application> is available.
    190199    </para>
    191200
     
    414423
    415424      <sect4>
    416         <title>'su'</title>
    417 
    418 <screen role="root"><userinput>cat &gt; /etc/pam.d/su &lt;&lt; "EOF"
    419 <literal># Begin /etc/pam.d/su
    420 
    421 # always allow root
    422 auth      sufficient  pam_rootok.so
    423 
    424 # Allow users in the wheel group to execute su without a password
    425 # disabled by default
    426 #auth      sufficient  pam_wheel.so trust use_uid
    427 
    428 # include system auth settings
    429 auth      include     system-auth
    430 
    431 # limit su to users in the wheel group
    432 auth      required    pam_wheel.so use_uid
    433 
    434 # include system account settings
    435 account   include     system-account
    436 
    437 # Set default environment variables for the service user
    438 session   required    pam_env.so
    439 
    440 # include system session settings
    441 session   include     system-session
    442 
    443 # End /etc/pam.d/su</literal>
    444 EOF</userinput></screen>
    445       </sect4>
    446 
    447       <sect4>
    448425        <title>'chage'</title>
    449426
     
    483460            At this point, you should do a simple test to see if
    484461            <application>Shadow</application> is working as expected. Open
    485             another terminal and log in as a user, then <command>su</command> to
    486             <systemitem class="username">root</systemitem>. If you do not see
    487             any errors, then all is well and you should proceed with the rest of
    488             the configuration. If you did receive errors, stop now and double
    489             check the above configuration files manually. One obvious reason
    490             for an error is if the user is not in group <systemitem
    491             class="groupname">wheel</systemitem>. You may want to run (as
    492             <systemitem class="username">root</systemitem>): <command>usermod
    493             -a -G wheel <replaceable>&lt;user&gt;</replaceable></command>.
    494             Any other error is the sign of an error in the above procedure.
     462            another terminal and log in as
     463            <systemitem class="username">root</systemitem>, and then run
     464            <command>login</command> and login as another user.  If you do
     465            not see any errors, then all is well and you should proceed with
     466            the rest of the configuration. If you did receive errors, stop
     467            now and double check the above configuration files manually.
     468            Any error is the sign of an error in the above procedure.
    495469            You can also run the
    496             test suite from the <application>Linux-PAM</application> package to
    497             assist you in determining the problem. If you cannot find and fix
    498             the error, you should recompile <application>Shadow</application>
    499             adding the <option>--without-libpam</option> switch to the
    500             <command>configure</command> command in the above instructions (also
    501             move the <filename>/etc/login.defs.orig</filename> backup file to
    502             <filename>/etc/login.defs</filename>). If you fail to do this and
    503             the errors remain, you will be unable to log into your system.
     470            test suite from the <application>Linux-PAM</application> package
     471            to assist you in determining the problem. If you cannot find and
     472            fix the error, you should recompile
     473            <application>Shadow</application> adding the
     474            <option>--without-libpam</option> switch to the
     475            <command>configure</command> command in the above instructions
     476            (also move the <filename>/etc/login.defs.orig</filename> backup
     477            file to <filename>/etc/login.defs</filename>). If you fail to do
     478            this and the errors remain, you will be unable to log into your
     479            system.
    504480          </para>
    505481        </warning>
Note: See TracChangeset for help on using the changeset viewer.