You are not logged in.

#1 2013-09-09 19:30:46

s4ncho
Member
Registered: 2013-09-09
Posts: 4

lightdm password less login [not autologin]

Hello everyone.

I've got a problem with configuring lightdm (with kde-greeter).
According to https://wiki.archlinux.org/index.php/LightDM

You must be part of the autologin group to be able to login without entering your password:

So it should be enough to add myself to "autologin" group but it doesn't solve the problem,
neither creating and adding user to "nopasswdlogin" group (as can be found on other pages).

couple months ago when "testing" lightdm I'd used wiki's howto. but this part has been removed :
https://wiki.archlinux.org/index.php?ti … did=250663

I'm wondering how now I should do this. Nowadays I even haven't got the line:

auth required pam_unix.so

in /etc/pam.d/lightdm

Any help appreciated.

Offline

#2 2013-09-10 10:06:14

electric_indigo
Member
Registered: 2011-05-12
Posts: 89

Re: lightdm password less login [not autologin]

Install gnome-keyring and seahorse, then run the latter and follow these instructions: https://wiki.archlinux.org/index.php/Gn … _using_GUI (enter the empty password).
Also, for some reason the autologin works only if you log in for the first time (right after booting the system). If you log in as any user and then log out, the autologin doesn't work.

Last edited by electric_indigo (2013-09-10 10:11:44)

Offline

#3 2013-09-10 20:12:13

s4ncho
Member
Registered: 2013-09-09
Posts: 4

Re: lightdm password less login [not autologin]

Thanks for replay.

I'd installed gnome-keyring and seahorse (my user's still in "autologin", and "nopasswdlogin" groups) ,
and I've run seahorse as root, and tried to go step by step as in your link.

After selecting "By Keyring" (I'm using kde) there was no "Passwords" tab,
running seahorse as normal user (not root) I was able to create new "Password Keyring" with the name "Passwords:login" (with empty password), which for unknown reason is not available for root.

Unfortunately just as expected neither after logout, lightdm could log me in without password, nor after computer restart.

Last edited by s4ncho (2013-09-10 20:16:16)

Offline

#4 2013-09-11 02:50:45

electric_indigo
Member
Registered: 2011-05-12
Posts: 89

Re: lightdm password less login [not autologin]

I forgot to add that I have the autologin-user-timeout in /etc/lightdm/lightdm.conf set to -1, but I doubt it's the issue; this simply prevents from instant login, letting you choose the user. And of course, by 'autologin' in my previous post I actually meant 'passwordless login'. And gnome-keyring should be ran as normal user, indeed. But if you're using KDE, you might want to check this: https://wiki.archlinux.org/index.php/Gn … hout_GNOME.

There is also a simple alternative way - deleting the password for the given user with

# passwd --delete your_username

However, this creates certain issues, e.g. you won't be able to directly login in console, you'll have to use su/sudo as root or another privileged user; if you use xscreensaver, you won't be able to unlock the screenlock. And it's probably not safe from the security point of view.

Offline

#5 2013-09-11 20:55:04

s4ncho
Member
Registered: 2013-09-09
Posts: 4

Re: lightdm password less login [not autologin]

I need console so method 2 is not for me:/

I'd added the lines to ~/.xinitrc but it hasn't helped, so I've removed it.

Maybe my config, or debug logs can be usefull:

$ cat  /etc/lightdm/lightdm.conf  
[LightDM]
run-directory=/run/lightdm

[SeatDefaults]
allow-guest=true
autologin-guest=true
#autologin-user=marcin
greeter-session=lightdm-kde-greeter
#pam-service=lightdm-autologin
session-wrapper=/etc/lightdm/xsession

[VNCServer]
enabled=false

[XDMCPServer]
enabled=false

$ cat /etc/pam.d/lightdm
#%PAM-1.0
auth        include     system-login
#MWO
auth        [success=1 default=ignore]  pam_succeed_if.so user ingroup autologin
auth        required    pam_unix.so
auth        required    pam_permit.so 
#MWO
-auth       optional    pam_gnome_keyring.so
account     include     system-login
password    include     system-login
session     include     system-login
-session    optional    pam_gnome_keyring.so auto_start

$ cat /etc/pam.d/lightdm-greeter                                                                                                                                    
#%PAM-1.0                                                                                                                                                                             
                                                                                                                                                                                      
# Load environment from /etc/environment and ~/.pam_environment                                                                                                                       
auth      required pam_env.so                                                                                                                                                         
                                                                                                                                                                                      
# Always let the greeter start without authentication
auth      required pam_permit.so

# No action required for account management
account   required pam_permit.so

# Can't change password
password  required pam_deny.so

# Setup session
session   required pam_unix.so

my ligthdm log:

$  lightdm -d --test-mode
[+0.00s] DEBUG: Logging to /home/marcin/.cache/lightdm/log/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.6.0, UID=1000 PID=2833
[+0.00s] DEBUG: Loaded configuration from /etc/lightdm/lightdm.conf
[+0.01s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.01s] DEBUG: Running in user mode
[+0.01s] DEBUG: Using Xephyr for X servers
[+0.01s] DEBUG: Registered seat module xlocal
[+0.01s] DEBUG: Registered seat module xremote
[+0.01s] DEBUG: Adding default seat
[+0.01s] DEBUG: Starting seat
[+0.01s] DEBUG: Starting new display for automatic guest login
[+0.01s] DEBUG: Starting local X display
[+0.01s] DEBUG: Could not run plymouth --ping: Failed to execute child process "plymouth" (No such file or directory)
[+0.01s] DEBUG: Logging to /home/marcin/.cache/lightdm/log/x-1.log
[+0.01s] DEBUG: Writing X server authority to /run/lightdm/root/:1
[+0.01s] WARNING: Error reading existing Xauthority: Failed to open file '/run/lightdm/root/:1': Permission denied
[+0.01s] WARNING: Failed to write authority: Failed to create file '/run/lightdm/root/:1.GFNA3W': Permission denied
[+0.01s] DEBUG: Launching X Server
[+0.01s] DEBUG: Launching process 2836: /usr/bin/Xephyr :1 -auth /run/lightdm/root/:1 -nolisten tcp
[+0.02s] DEBUG: Waiting for ready signal from X server :1
[+0.02s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.02s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+0.36s] DEBUG: Got signal 10 from process 2836
[+0.36s] DEBUG: Got signal from X server :1
[+0.36s] DEBUG: Connecting to XServer :1
[+0.36s] DEBUG: Automatically logging in as guest
[+0.36s] DEBUG: Opening guest account with command '(null) add'
[+0.37s] WARNING: Error running guest account setup script '(null)': Failed to execute child process "(null)" (No such file or directory)
[+0.37s] DEBUG: Can't autologin guest, no guest account
[+0.37s] DEBUG: Starting greeter
[+0.38s] DEBUG: org.freedesktop.Accounts does not exist, falling back to passwd file
[+0.38s] DEBUG: Started session 2841 with service 'lightdm-greeter', username 'marcin'
[+0.41s] DEBUG: Session 2841 authentication complete with return value 0: Success
[+0.41s] DEBUG: Greeter authorized
[+0.41s] DEBUG: Logging to /home/marcin/.cache/lightdm/log/x-1-greeter.log
[+0.42s] DEBUG: Session 2841 running command /usr/bin/lightdm-kde-greeter
[+1.00s] DEBUG: Greeter connected version=1.6.0
[+1.00s] DEBUG: Greeter connected, display is ready
[+1.00s] DEBUG: New display ready, switching to it

after presing trying to login without password :

[+80.33s] DEBUG: Greeter start authentication for marcin
[+80.33s] DEBUG: Started session 2907 with service 'lightdm', username 'marcin'
[+80.36s] DEBUG: Session 2907 got 1 message(s) from PAM
[+80.36s] DEBUG: Prompt greeter with 1 message(s)
[+80.36s] DEBUG: Continue authentication
[+82.68s] DEBUG: Session 2907 authentication complete with return value 7: Authentication failure
[+82.68s] DEBUG: Authenticate result for user marcin: Authentication failure
[+82.68s] DEBUG: Session 2907 exited with return value 1

Last edited by s4ncho (2013-09-12 06:11:28)

Offline

#6 2013-09-11 21:16:37

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: lightdm password less login [not autologin]

When pasting configs, code or command output, please use [ code ] tags, not [ quote ] tags https://bbs.archlinux.org/help.php#bbcode

like this

It makes the code more readable and - in case of longer listings - more convenient to scroll through.

Offline

#7 2013-09-15 08:41:49

s4ncho
Member
Registered: 2013-09-09
Posts: 4

Re: lightdm password less login [not autologin]

karol wrote:

When pasting configs, code or command output, please use [ code ] tags, not [ quote ]

done.

I'd removed lightdm, lightdm-kde-greeter and I've installed it again to have a clean config files.
now my in /etc/lightdm/lightdm  pam service is:

pam-service=lightdm-autologin

If I'm not wrong full path for this should /etc/pam.d/lightdm-autologin:

#%PAM-1.0
auth        required    pam_env.so
auth        required    pam_tally.so file=/var/log/faillog onerr=succeed
auth        required    pam_shells.so
auth        required    pam_nologin.so
auth        [success=1 default=ignore]  pam_succeed_if.so user ingroup autologin
auth        required    pam_unix.so
auth        required    pam_permit.so
-auth       optional    pam_gnome_keyring.so
account     include     system-local-login
password    include     system-local-login
session     include     system-local-login
-session    optional    pam_gnome_keyring.so auto_start

It looks very similar to the settings I used to have in old system https://wiki.archlinux.org/index.php?ti … did=250663
(it is the removed entry form the upper diff link)

but I'm wondering if one of the line below is not the problem:

$  lightdm -d --test-mode
(..)
[+0.01s] WARNING: Error reading existing Xauthority: Failed to open file '/run/lightdm/root/:1': Permission denied
[+0.01s] WARNING: Failed to write authority: Failed to create file '/run/lightdm/root/:1.MGH92W': Permission denied
(...)
[+0.27s] DEBUG: org.freedesktop.Accounts does not exist, falling back to passwd file

Offline

Board footer

Powered by FluxBB