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

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

    <bug>
          <bug_id>23643</bug_id>
          
          <creation_ts>2010-06-21 13:07:48 +0400</creation_ts>
          <short_desc>Не работает /sbin/nologin</short_desc>
          <delta_ts>2010-10-26 15:30:31 +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>gdm</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>security</keywords>
          <priority>P3</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>23155</blocked>
    
    <blocked>23644</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Кузьмин Антон">kuzya</reporter>
          <assigned_to name="Dmitry V. Levin">ldv</assigned_to>
          <cc>aen</cc>
    
    <cc>aris</cc>
    
    <cc>cas</cc>
    
    <cc>erthad</cc>
    
    <cc>gns</cc>
    
    <cc>kharpost</cc>
    
    <cc>ldv</cc>
    
    <cc>php-coder</cc>
    
    <cc>rider</cc>
    
    <cc>shaba</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>109974</commentid>
    <comment_count>0</comment_count>
    <who name="Кузьмин Антон">kuzya</who>
    <bug_when>2010-06-21 13:07:48 +0400</bug_when>
    <thetext>Здравствуйте. У меня на компьютере есть 5 учётных записей для локальных пользователей. Недавно мне понадобилось заблокировать 2 из них. Я зашёл в Центр Управления Системой, и у нужных аккаунтов установил интерпритатор команд как /sbin/nologin. Выйдя из своей учётной записи я увидел что они пропали из списка выбора пользователей. Но после перезагрузки они вновь там появились, и под ними можно заходить в систему. Я зашёл в Центр, и проверил стоит ли у них /sbin/nologin. Всё стояло правильно. Чтоб снова из заблокировать мне пришлось выбрать в качестве интерпритатора /bin/bash, а затем снова /sbin/nologin. Тогда они исчезли. Но опять до следующей перезагрузки :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109976</commentid>
    <comment_count>1</comment_count>
    <who name="Andrey Cherepanov">cas</who>
    <bug_when>2010-06-21 13:52:00 +0400</bug_when>
    <thetext>Смотрите, устанавливается ли интерпретатор в /etc/passwd.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109977</commentid>
    <comment_count>2</comment_count>
    <who name="Кузьмин Антон">kuzya</who>
    <bug_when>2010-06-21 14:10:33 +0400</bug_when>
    <thetext>Да. Вот пример строки одного проблемного аккаунта
    nastya:x:502:502::/home/nastya:/sbin/nologin
При этом я спокойно переключаю пользователя и захожу под этим этим логином.

Забыл сказать, в ЦУПе галочки &quot;Входит в группу администраторов&quot; у этих аккаунтов не стоит</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109978</commentid>
    <comment_count>3</comment_count>
    <who name="Andrey Cherepanov">cas</who>
    <bug_when>2010-06-21 14:45:37 +0400</bug_when>
    <thetext>Имеем большую дырку в безопасности в KDM и GDM, когда пускает пользователей в графическую среду (правда, не даёт возможность воспользоваться эмулятором терминала). Спасибо за найденную уязвимость.

Из всех DM не подвержен этому поведению XDM.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109982</commentid>
    <comment_count>4</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2010-06-21 14:56:10 +0400</bug_when>
    <thetext>man usermod:
       -L     Lock  a  user&apos;s  password.  This  puts  a  &apos;!&apos;  in  front of the
              encrypted password, effectively  disabling  the  password.   You
              can&apos;t use this option with -p or -U.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109983</commentid>
    <comment_count>5</comment_count>
    <who name="Nick S. Grechukh">gns</who>
    <bug_when>2010-06-21 14:57:46 +0400</bug_when>
    <thetext>(In reply to comment #3)
&gt; Имеем большую дырку в безопасности в KDM и GDM, когда пускает пользователей в
&gt; графическую среду (правда, не даёт возможность воспользоваться эмулятором
&gt; терминала). Спасибо за найденную уязвимость.
&gt; 
&gt; Из всех DM не подвержен этому поведению XDM.

DESCRIPTION
       pam_shells is a PAM module that only allows access to the system if the users shell is listed in /etc/shells.

       It also checks if /etc/shells is a plain file and not world writable.

[altlinux@eeelive ~]$ sudo grep -i shell /etc/pam.d/*
/etc/pam.d/vsftpd:auth		required	pam_shells.so

[altlinux@eeelive ~]$ cat /etc/shells 
/bin/sh
/bin/bash
/bin/ash
/bin/bsh
/bin/csh
/bin/tcsh
/bin/ksh
/bin/zsh</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109985</commentid>
    <comment_count>6</comment_count>
    <who name="Andrey Cherepanov">cas</who>
    <bug_when>2010-06-21 15:49:24 +0400</bug_when>
    <thetext>(В ответ на комментарий №5)
&gt; /etc/pam.d/vsftpd:auth        required    pam_shells.so
Да, именно строку 

auth  required   pam_shells.so

нужно добавить в /etc/pam.d/gdm.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109986</commentid>
    <comment_count>7</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2010-06-21 15:52:27 +0400</bug_when>
    <thetext>I&apos;ll take care of this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110030</commentid>
    <comment_count>8</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2010-06-22 23:53:04 +0400</bug_when>
    <thetext>gdm-2.30.2-alt1 -&gt; sisyphus:

* Tue Jun 22 2010 Alexey Shabalin &lt;shaba@altlinux&gt; 2.30.2-alt1
- 2.30.2
- ldv@: /etc/pam.d/gdm: Added pam_shells to auth stack (closes: #23643).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>