Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 756181 - x11-misc/slim-1.3.6-r5 black screen if the password is entered incorrect
Summary: x11-misc/slim-1.3.6-r5 black screen if the password is entered incorrect
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-11-23 07:36 UTC by bagas
Modified: 2023-03-14 19:30 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
PAM_PERM_DENIED support (slim-1.3.6-pam-perm-denied.patch,354 bytes, patch)
2021-10-05 23:35 UTC, Konstantin Kuzov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bagas 2020-11-23 07:36:43 UTC
Hello.
A situation arose.
Please tell me how to solve this problem.
If you enter the wrong password when logging in through slim, a black screen appears.
It's strange.
If you enter the login / password of a non-existent user, the slim authorization window is simply reset and allows you to re-enter the login / password.
If you enter the wrong password for an existing user, then a black screen and you have to reboot xdm again.
It seems to me that there is something in the pam palettes.

/etc/slim.conf
default_path        /bin:/usr/bin:/usr/local/bin
default_xserver     /usr/bin/X
xserver_arguments   -nolisten tcp -br -deferglyphs 16 vt07
halt_cmd            /sbin/shutdown -h now
reboot_cmd          /sbin/shutdown -r now
console_cmd         /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
xauth_path         /usr/bin/xauth
authfile           /var/run/slim.auth
numlock             on
login_cmd           exec /bin/bash -login /usr/share/slim/Xsession %session
sessionstart_cmd   /usr/bin/sessreg -a -l :0.0 %user
sessionstop_cmd     /usr/bin/sessreg -d -l :0.0 %user
daemon   yes
sessiondir   /usr/share/xsessions
screenshot_cmd      import -window root /slim.png
welcome_msg         Welcome to %host
shutdown_msg       The system is halting...
reboot_msg         The system is rebooting...
current_theme       flat
lockfile            /run/slim.pid
logfile             /var/log/slim.log

/var/log/messages.
Nov 16 18:17:41 serv1 slim[3662]: pam_unix(slim:auth): authentication failure; logname= uid=0 euid=0 tty=:0.0 ruser=root rhost=  user=bars

slim.log
slim: waiting for X server to begin accepting connections.
slim: pam_authenticate(): Permission denied

My system.
Linux 5.4.72-gentoo x86_64

Installed package.
x11-misc/slim-1.3.6-r5 -branding pam
x11-themes/slim-themes-1.2.3a-r7
sys-libs/pam-1.4.0_p20200829-r1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -audit berkdb -debug filecaps -nis pie -selinux split-usr
sys-auth/pambase-20201103 -caps -debug elogind -gnome-keyring -minimal -mktemp nullok -pam_krb5 -pam_ssh passwdqc -pwhistory -pwquality -securetty -selinux sha512 -systemd
virtual/pam-0-r1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_ppc_32 -abi_ppc_64 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32

Desktop environment.
xfce4-about 4.14.1
Comment 1 globus 2020-11-23 08:57:17 UTC
I confirm that it's the same for me.
Comment 2 Yevgeny Dyatlov 2021-01-12 11:19:26 UTC
Confirm, I have the same issue. 

$ grep -v -e "#" -e ^$ /etc/slim.conf
default_path        /bin:/usr/bin:/usr/local/bin
default_xserver     /usr/bin/X
xserver_arguments   -nolisten tcp -br -deferglyphs 16 vt07
halt_cmd            /sbin/shutdown -h now
reboot_cmd          /sbin/shutdown -r now
console_cmd         /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
xauth_path         /usr/bin/xauth 
authfile           /var/run/slim.auth
numlock             on
login_cmd           exec /bin/bash -login /usr/share/slim/Xsession %session
sessionstart_cmd	/usr/bin/sessreg -a -l :0.0 %user
sessionstop_cmd     /usr/bin/sessreg -d -l :0.0 %user
daemon	yes
sessiondir	/usr/share/xsessions
screenshot_cmd      import -window root /slim.png
welcome_msg         Welcome to %host
shutdown_msg       The system is halting...
reboot_msg         The system is rebooting...
default_user        user_name
focus_password      yes
current_theme       wave
lockfile            /run/slim.pid
logfile             /var/log/slim.log

$ cat /var/log/slim.log
slim: waiting for X server to begin accepting connections.
slim: pam_authenticate(): Permission denied

$ uname -rvmpi
5.4.72-gentoo-nouveau #1 SMP PREEMPT Mon Oct 26 13:53:02 MSK 2020 x86_64 AMD Athlon(tm) 64 Processor 3200+ AuthenticAMD

$ xfce4-about --version
xfce4-about 4.14.1 (Xfce 4.14)

$ eselect profile show
Current /etc/portage/make.profile symlink:
  default/linux/amd64/17.1/desktop
Comment 3 Joseph 2021-02-08 02:43:40 UTC
I'm experiencing same thing. Black screen when I log-in with "slim".  I'm not sure if this is slim problem or xdm.

For now, I disable xdm and start X from .xinitrc

cat .xinitrc 
exec startxfce4


cat .bash_profile 
...

if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then exec startx; fi

It is more reliable.
Comment 4 Francisco Lloret 2021-05-21 09:21:13 UTC
(In reply to Joseph from comment #3)
> I'm experiencing same thing. Black screen when I log-in with "slim".  I'm
> not sure if this is slim problem or xdm.
> 
> For now, I disable xdm and start X from .xinitrc
> 
> cat .xinitrc 
> exec startxfce4
> 
> 
> cat .bash_profile 
> ...
> 
> if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then exec startx; fi
> 
> It is more reliable.

Is not xdm related. After upgrade from xdm to display-manager, the problem persists.
Comment 5 Francisco Lloret 2021-05-21 09:36:46 UTC
It's a slim problem. Changet it to lightdm and the problem is solved
Comment 6 Konstantin Kuzov 2021-10-05 23:35:59 UTC
Created attachment 743337 [details, diff]
PAM_PERM_DENIED support

Modern PAM could return PARM_PERM_DENIED when user is valid but password isn't. Slim tries to be on the safe side and terminate itself on unknown PAM response. So to prevent that we just need to treat PAM_PERM_DENIED as failed authentication.
Comment 7 Robert Pearce 2022-01-02 22:56:27 UTC
I've also hit this problem (though, bizarrely, only on the machines installed from my binpkg output, not the machine that built them). I will try the patch and see.
While I'm at it, I should probably update/submit my patch for logging in as an expired user (older slim used to completely ignore the "expired" flag, now it produces the same black screen)
Comment 8 Robert Pearce 2022-01-03 11:35:47 UTC
(In reply to Konstantin Kuzov from comment #6)
> Created attachment 743337 [details, diff] [details, diff]
> PAM_PERM_DENIED support
> 
Unfortunately your patch doesn't fix it for me. I still get the black screen. The slim log shows a PAM error report, which looks (from inspection of the code) to be what's expected, and really ought to result in another go round the loop, but seems instead to produce an error exit.
Comment 9 Sergey S. Starikoff 2022-02-06 12:39:15 UTC
*** Bug 803476 has been marked as a duplicate of this bug. ***
Comment 10 Larry the Git Cow gentoo-dev 2023-03-14 19:30:03 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33127b6d177f2d123c333c239a4ca13bfafd8124

commit 33127b6d177f2d123c333c239a4ca13bfafd8124
Author:     Robert Pearce <gentoo@flitspace.org.uk>
AuthorDate: 2023-02-21 08:01:47 +0000
Commit:     Viorel Munteanu <ceamac@gentoo.org>
CommitDate: 2023-03-14 19:28:15 +0000

    x11-misc/slim: Added ebuilds for the resurrected upstream project
    
    Fixed issues from pkgcheck
    List myself as a proxy maintainer
    
    Correct several issues pointed out in review by ceamac and added a -9999 ebuild
    in light of discussion
    
    Closes: https://bugs.gentoo.org/832562
    Closes: https://bugs.gentoo.org/727544
    Closes: https://bugs.gentoo.org/832303
    Closes: https://bugs.gentoo.org/580458
    Closes: https://bugs.gentoo.org/803476
    Closes: https://bugs.gentoo.org/732430
    Closes: https://bugs.gentoo.org/756181
    Signed-off-by: Robert Pearce <gentoo@flitspace.org.uk>
    Closes: https://github.com/gentoo/gentoo/pull/29838
    Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>

 x11-misc/slim/Manifest                             |   2 +
 x11-misc/slim/files/slim-1.3.9-config.diff         |  49 ++++++++++
 .../slim/files/slim-1.3.9-greeter-session.diff     |  12 +++
 x11-misc/slim/files/slim-1.4.0-config.diff         |  48 ++++++++++
 x11-misc/slim/metadata.xml                         |  11 ++-
 x11-misc/slim/slim-1.3.9.ebuild                    |  98 +++++++++++++++++++
 x11-misc/slim/slim-1.4.0.ebuild                    | 104 +++++++++++++++++++++
 x11-misc/slim/slim-9999.ebuild                     | 104 +++++++++++++++++++++
 8 files changed, 426 insertions(+), 2 deletions(-)