PDA

View Full Version : HowTo: enable empty password login (password less login), no password login


bluefrog
June 5th, 2008, 05:38 AM
For those who want to enable a guest cybercafé style session (or windows guest style) in Ubuntu 8.04 Hardy.

There will be no need to do that in Intrepid Ibex as there will be a "native" guest session.

Scope of this HowTo
You want to enable a password less account in Gnome for your family/friends who have access to your computer.

This is different than not typing a password (autologin)

HowTo - by example

WARNING: Following this HowTo will most likely screw up your ability to create users on your system with the graphical tool "users and groups". I haven't found the way to revert to a working graphical tool and still not understand what is destroyed when changing what follows below.

BUT you will still be able to add users using the sudo adduser command.

Create a user (system/administration/user and groups)
You can put fancy characters in the real name but not in the username.
You are obliged to enter a password. We will get read of it afterwards.

example:
username: guest
real name: invité (or guest or whatever you want to display in the graphical greeter later on)
profile: desktop user (DO NOT use administrator)
password: password

click ok and close the users and groups tool.

Remove the password for the guest user
open a terminal


sudo passwd -d guest


Authorize login with no passwords in gdm


sudo sed -i 's/#PasswordRequired=false/PasswordRequired=false/' /etc/gdm/gdm.conf


Authorize login with no passwords in pam


sudo sed -i 's/nullok_secure/nullok/' /etc/pam.d/common-auth


You can now log in with your guest user with no password.

If you want a graphical greeter screen, select it in system/administration/login window [local tab] (example: human list)

James Dupin

zappp
July 9th, 2008, 12:08 PM
Thank you for explaining how to allow passwdless login!
I have encountered a small problem however, perhaps you know about it?

Normally, switching between users is easily done by clicking in the name list on the top bar (default gnome, Ubuntu 8.04 settings) and simply typing in the password for that user.

Now however, when wanting to switch that way it wont login to that other user's account, it will instead ask for locking up the current user's login-session as when having locked the screen.

Any idea what causes this?

bluefrog
July 11th, 2008, 04:08 AM
No idea as this feature works perfectly for me (just tried it) and I can switch back an forth from/to my password less account to my regular account.

flabdablet
March 3rd, 2009, 01:40 PM
I just found my way in here after working out how to do this a different way. So far, I have noticed no impact on the Users and Groups graphical tool - it still seems to work just fine.

I created the password-less user the same way as described here (using passwd -d).

I found I didn't need to make any change at all to /etc/gdm/gdm.conf. Persuading PAM to allow password-less authentication from the X displays used by GDM and gnome-screensaver was all that was required.

Instead of altering anything inside /etc/pam.d, I appended the following to /etc/securetty:



# X displays
:0
:0.0
:1
:1.0
:2
:2.0
:3
:3.0
:4
:4.0
:5
:5.0
:6
:6.0
:7
:7.0
:8
:8.0
:9
:9.0
:10
:10.0
:11
:11.0
:12
:12.0
:13
:13.0
:14
:14.0
:15
:15.0
:16
:16.0
:17
:17.0
:18
:18.0
:19
:19.0
:20
:20.0
:21
:21.0
:22
:22.0
:23
:23.0
:24
:24.0
:25
:25.0
:26
:26.0
:27
:27.0
:28
:28.0
:29
:29.0
:30
:30.0
:31
:31.0
:32
:32.0
:33
:33.0
:34
:34.0
:35
:35.0
:36
:36.0
:37
:37.0
:38
:38.0
:39
:39.0
:40
:40.0
:41
:41.0
:42
:42.0
:43
:43.0
:44
:44.0
:45
:45.0
:46
:46.0
:47
:47.0
:48
:48.0
:49
:49.0
:50
:50.0
:51
:51.0
:52
:52.0
:53
:53.0
:54
:54.0
:55
:55.0
:56
:56.0
:57
:57.0
:58
:58.0
:59
:59.0
:60
:60.0
:61
:61.0
:62
:62.0
:63
:63.0


The effect is to make PAM treat the X displays used by GDM and the sessions it starts the same way as it already treats the text consoles, which do allow logins by password-less users.