Update PAM policy to allow password-less logins set up via users-admin

Bug #393854 reported by Milan Bouchet-Valat
126
This bug affects 17 people
Affects Status Importance Assigned to Milestone
gdm
Fix Released
Wishlist
gdm (Debian)
Fix Released
Unknown
gdm (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

Binary package hint: gdm

Upstream gnome-system-tools will have in 2.28 an option to allow specified users to log in graphically and locally without entering their password. This is intended for home users that can't use GDM's autologin because they are several on the same computer. A rationale is at:
http://markmail.org/message/2h5isyf3kip6updb#query:gdm%20passwordless+page:1+mid:pa6lrzmwdtbol5it+state:results
and the bug upstream was http://bugzilla.gnome.org/show_bug.cgi?id=414862

For this to work in Ubuntu, we need to add a rule to the PAM configuration file:
auth sufficient pam_succeed_if.so user ingroup nopasswdlogin

And to create the group 'nopasswdlogin' in the postinstall script.

Attached is a debdiff that does that. I guess somebody familiar with Ubuntu's PAM rules should check it since that's a critical part of the system's security, but that way of achieving this has been accepted by Brian Cameron (GDM) and Carlos Garnacho (gnome-system-tools) as safe, and many users has been using this as a hack for some time.

This change should also affect gnome-screensaver so that the screen is not locked after suspend. I'll post a diff for that too, and for the gdm-new package.

Please ask if you need more explanations about how this works.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

I've subscribed ubuntu-security to take a look at that.

Changed in gdm (Ubuntu):
importance: Undecided → Wishlist
Changed in gdm:
status: Unknown → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

the debdiff has a typo in the group naming

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Woops! A good start would be to get group names right... Anyways, there was also a tabulation problem, the new patch uses spaces for aligns.

Changed in gdm (Ubuntu):
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

The issue is fixed in karmic now

Changed in gdm (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Sorry Sebastien, but I've checked the file gdm.pam in gdm 2.27.4-0ubuntu6, and it's not applied. The upstream default file includes the required line, but AFAIK it's not used.

Changed in gdm:
status: Fix Released → Confirmed
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Here's the debdiff against GDM 2.27.4 which is now in Karmic. Please review!

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Ping...

I'm not sure why the Ubuntu Security Team has been unsubscribed from this bug, but please have a look at that and leave a quick comment. Then the debdiff is ready to be applied... Thanks!

Changed in gdm (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Another try to get this reviewed? Launchpad has not updated the upstream report status, which has been fixed for a long time actually. The gnome-system-tools also have this in Karmic for more than a month. What's the point in adding new features upstream if distributors don't follow? We're going to show a greyed out check box if nothing is done, really not user-friendly...

Revision history for this message
Jan Claeys (janc) wrote :

I didn't know this was implemented upstream already (didn't check before, actually).

This is something many people ask for when I install Ubuntu for them, e.g. to allow young kids to use a computer without needing to enter a password, while still preventing them from destroying their mom & dad's files... :-)

Would be nice if we could get this in karmic before the release.

@Milan: if you fold open the "affects gdm" line, Launchpad says that that bug doesn't exist... weird?

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Jan: I think Launchpad remote bug watches have had some trouble with the new GNOME Bugzilla, but it seems to have been solved in other bugs yesterday.

Revision history for this message
Michael Evans (mjevans1983) wrote :

My use case is different. My parents are near retirement and just want a super-easy-to-use computer; that means security via physical access only. Accounts are merely a preference filing system to them.

Password-less accounts in the admin group are a questionable thing; but if that's what the system-administrator sets up that is what they have decided to use or their clients have demanded. In that case the accounts should still be able to authenticate.

The use case of children, guests, and other password-less accounts should involve removal of the admin and likely some other groups or accounts that never had those groups.

Further, it would be -extremely- nice to have an account editing tool that could create new accounts and visually diff existing accounts against template users (such as guest, system-administrator, etc).

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

MichaelEvans: I did not post you the link to this bug so that you say me "it's not what I'm asking for". Please don't use reports about a precise issue as a general-purpose forum.

And user profiles already exist in users-admin, currently we have Admin, Desktop User and Unprivileged. So just create a Desktop User account for you parents, and an Admin one for you, using that one to authenticate when performing admin tasks. But we should definitely not discuss this here.

Revision history for this message
Michael Evans (mjevans1983) wrote :

Sorry, I was trying to clarify potential use cases, both for passwords with and passwords without sys-admin capabilities. Editing accounts is probably some other bug... all the usability issues that I see as related actually collections of different bugs. Each bug a small piece of grit fouling the smooth accomplishment of a task. I'll try to break away from the task and instead focus on the pathology of each individual grit.

Revision history for this message
Michael Evans (mjevans1983) wrote :

Also, I just noticed when going to file the other wishlist bug... Why was my bug linked to GDM as a duplicate? I specifically chose the proper package and hadn't looked; this isn't related to mine at all!

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

MichaelEvans: Your bug was about a use case that we don't consider as valid. There are other means of achieving the same thing (password-less account), which we consider as better for everyone. So I could mark your bug as Invalid, or as a duplicate of this one, which should also allow you to do what you want. If you don't like that, I can remove that, but that does not really matter.

Revision history for this message
Tony Yarusso (tonyyarusso) wrote :

Given that this was supposed to be fixed before Karmic release, the fix is known, and we've now shipped a greyed-out checkbox to users, is this likely to get fixed in Karmic, or should I tell my dad to expect it in Lucid only?

Changed in gdm (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Steve Langasek (vorlon) wrote :

The pam_unix module in Ubuntu supports granting access to passwordless accounts by way of the 'nullok_secure' option, which says: accounts with a null password field are allowed access, as long as the connection is on a "secure" tty (defined by /etc/securetty). This is already in effect by default for all services, including gdm; I don't think it's appropriate to have two separate mechanisms for configuring passwordless logins on the system. Adding a special group to the system is, in particular, a design that's rather unnecessarily complex.

(The nullok_secure support in pam_unix is still in need of upstreaming to Linux-PAM, so it's understandable that gdm upstream isn't using that instead; still, I don't think we want this patch.)

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

The rationale behind this feature vs. the standard nullok_secure way is that *you actually have a password*. This means users can be admins, type their password to use sudo, PolicyKit or lock their screen, but they are not asked to type it on login. They can additionally connect over local SSH for example.

There are many use cases for this - if you consider how people are used to configure their Windows home computers for example: as long as you're not the only user on the box (-> GDM autoconnect), you are forced to type your password. So if you want to avoid that without losing all security, and that you want to be an admin (quite common), you need this feature.

users-admin has never allowed people to use an empty password because of security considerations. I've already closed several feature requests like that. Are you suggesting we should make it easy to use empty passwords ("Use no password' " button)? I'd find it quite bad, but OTOH we need an easy way for people to skip this step if they don't want to type a password.

The current situation can be counter-productive: friends of mine are using silly passwords such as "xxxx" because they don't care. If we weren't forcing them to type passwords on login, I would happily force users to choose a strong password in users-admin, which would improve security.

So all in all, I see more use cases for this method than for the traditional nullok_secure option. Dropping the latter wouldn't hurt IMHO if we can provide a better approach.

Revision history for this message
lumbricus (lumbricus) wrote :

Using Ubuntu 9.10 I just added manually the new line from the patch to /etc/pam.d/gdm:

auth sufficient pam_succeed_if.so user ingroup nopasswdlogin

And afterwards I created the usergroup:

sudo addgroup --system nopasswdlogin

Then the option in "Users and groups" wasn't greyed out anymore and everything worked as expected!

Thanks a lot for the patch, I hope it will make it into 10.4!

Revision history for this message
lumbricus (lumbricus) wrote :

There is a problem with passwordless logins and the default configuration of karmic: you can't change the language (and whatever you'd like to configure in GDM), because the buttons are hidden until you choose a user...

Don't know if it's possible to display the buttons also before selecting a user.

Revision history for this message
Martin Pitt (pitti) wrote :

Pushed to gdm packaging branch. Thanks Milan, and sorry that this took so long! At least it comes in time for the LTS :)

Changed in gdm (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Thanks! Right, that took quite a long time - I first started to think about that about two years ago... But LTS is what matters.

lumbricus: could you open a report about the configuration bug you describe, and post the link here? I'm not sure that will be an easy one to fix, but better keep track of it.

Revision history for this message
lumbricus (lumbricus) wrote :

Ok, I opend a new bug for the problem with hidden options before selecting a user:
https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/508552

Changed in gdm:
importance: Unknown → Wishlist
status: Confirmed → Fix Released
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Fix released before 10.04 at long time ago.

Changed in gdm (Ubuntu):
status: Fix Committed → Fix Released
Changed in gdm (Debian):
status: Unknown → New
Changed in gdm (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.