Cannot chose language with home on nfs export

Bug #1156670 reported by Lars Behrens
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
accountsservice (Ubuntu)
Fix Released
Low
Unassigned
Precise
Fix Released
Low
Gunnar Hjalmarsson

Bug Description

[Impact]
Accountsservice incorrectly prevents you from changing the user language if HOME is on NFS.

[Test Case]
Can be reproduced anytime on Precise when logged in as a user whose HOME is on NFS.

[Regression Potential]
Minimal.

[Original description]
There is no possibility to choose language in an interactive way in Ubuntu 12.04, neither with XFCE4 nor with Gnome, neither with lightdm nor with GDM3 when home dirs aren't on local drive.

Error message:
gdm-session-worker[2009]: AccountsService-WARNING: SetLanguage call failed: not access to HOME yet so language not saved

That's a bummer, I have users from all over the world, they need to be able to choose their own language.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: accountsservice 0.6.15-2ubuntu9.4
ProcVersionSignature: Ubuntu 3.2.0-38.61-generic 3.2.37
Uname: Linux 3.2.0-38-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu17.1
Architecture: amd64
Date: Mon Mar 18 16:21:13 2013
InstallationMedia: Xubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120817.3)
MarkForUpload: True
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: accountsservice
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Lars Behrens (lars-behrens-u) wrote :
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks for your help to improve Ubuntu by reporting this bug!

The problem with incorrect failures in accountsservice when HOME is on NFS was also reported in bug 1083605, and a fix has been uploaded to Ubuntu 13.04. I attach a patch with a fix for 12.04.

accountsservice builds for 12.04 (Precise) including the fix are available in my PPA at https://launchpad.net/~gunnarhj/+archive/misc
Lars, can you please install that version of accountsservice and let us know if it fixes the issue for you.

tags: added: patch
Changed in accountsservice (Ubuntu):
status: New → Fix Released
description: updated
Changed in accountsservice (Ubuntu):
importance: Undecided → Low
Changed in accountsservice (Ubuntu Precise):
importance: Undecided → Low
status: New → Triaged
Changed in accountsservice (Ubuntu Precise):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
status: Triaged → In Progress
Revision history for this message
Lars Behrens (lars-behrens-u) wrote : Re: [Bug 1156670] Re: Cannot chose language with home on nfs export

Am 19.03.2013 12:10, schrieb Gunnar Hjalmarsson:
> Thanks for your help to improve Ubuntu by reporting this bug!
>
> The problem with incorrect failures in accountsservice when HOME is
> on NFS was also reported in bug 1083605, and a fix has been uploaded
> to Ubuntu 13.04. I attach a patch with a fix for 12.04.
>
> accountsservice builds for 12.04 (Precise) including the fix are
> available in my PPA at https://launchpad.net/~gunnarhj/+archive/misc
> Lars, can you please install that version of accountsservice and let
> us know if it fixes the issue for you.

Partly. :-\

~/.pam_environment gets written now but it doesn't get read in every case.

I am testing with two test accounts and my own one on two different
clients: Only with *one* of the accounts the language settings are
respected. Although ~/.pam_envirment gets written when changing settings
it seems to be ignored by two of the three identities. On *both* machines.

I have no idea why... ~/.profile are identical, copying .pam_enviroment
doesn't help either.

On one of the clients I added the infamous
'session required pam_env.so' at the end of /etc/pam.d/common-sesion
but that didn't help either.

Any ideas?

Thanks for your work and brains so far!

Revision history for this message
Lars Behrens (lars-behrens-u) wrote :

Must be something in the home directories:
I completely deleted the ~ of the not working test account and had a new one created, now the language settings work there.
So it is a matter of finding the bad settings file, can't delete all my users' home dirs. ;-)

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2013-03-19 16:59, Lars Behrens wrote:
> So it is a matter of finding the bad settings file, can't delete all
> my users' home dirs. ;-)

No, that would be rude... But this is progress compared to the other bug. :)

Can it possibly be something as simple as settings of environment variables in e.g. ~/.profile or ~/.bashrc ? If so, and even if ~/.pam_environment is read as expected, such settings would override ~/.pam_environment, so to say.

It should be noted that before 12.04, language settings via Language Support were saved in ~/.profile. There is migration code that should have cleaned up ~/.profile from such entries, but still...

@Steve: Does it possibly ring a bell?

Revision history for this message
Steve Langasek (vorlon) wrote :

Nothing that rings a bell for me, sorry.

Revision history for this message
Lars Behrens (lars-behrens-u) wrote :

Am 19.03.2013 19:21, schrieb Gunnar Hjalmarsson:

> Can it possibly be something as simple as settings of environment
> variables in e.g. ~/.profile or ~/.bashrc ? If so, and even if
> ~/.pam_environment is read as expected, such settings would override
> ~/.pam_environment, so to say.
>
> It should be noted that before 12.04, language settings via Language
> Support were saved in ~/.profile. There is migration code that should
> have cleaned up ~/.profile from such entries, but still...

Ok, I found it. So simple that it makes one laugh/cry: Our users' home
directories have been created without execution bits by 'DIR_MODE=700'
in /etc/adduser, since years obviously. Never noticed that, it never was
an issue.

The ones of the test users have been created by myself and they were
755, that's why they worked.

Ok, after chmodding all of our homes, your accountsservice package seems
to work (at least on 5 pcs with 5 accounts. And yes, I checked: without
your package the language settings still didn't work)

So how about your repo, is it safe to add it on all our machines, or are
there be more experimental changes to be expected? Best would be your
package would flow back into Ubuntu Precise.

Thanks a lot for your work Gunnar!

Cheerz,
Lars

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Glad to hear that you found the cause.

On 2013-03-20 14:26, Lars Behrens wrote:
> So how about your repo, is it safe to add it on all our machines, or are
> there be more experimental changes to be expected? Best would be your
> package would flow back into Ubuntu Precise.

I have proposed a patch that will result in exactly the same version as the one in my PPA being uploaded to the Precise archive. But since we are talking about a change to a stable release, there are some procedures to follow, so it will likely take a few weeks.

The function in question (including the fix) has been in the Raring archive for a few weeks, and no problem reported.

So I'd say it's safe to use it while awaiting the official update.

> Thanks a lot for your work Gunnar!

You're welcome.

Revision history for this message
Lars Behrens (lars-behrens-u) wrote :

Am 20.03.2013 15:54, schrieb Gunnar Hjalmarsson:

> So I'd say it's safe to use it while awaiting the official update.

Ok, thx. Bug resolved from my point of view.

And btw.: lightdm is working now, too. Last session type and language
getting stored.

Have a good time,
Lars

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2013-03-21 09:30, Lars Behrens wrote:
> And btw.: lightdm is working now, too. Last session type and language
> getting stored.

Do you mean lightdm 1.2.3-0ubuntu2 in precise-proposed? I didn't know that storing of session type has been a problem with NFS, and even if I was involved in that change (bug 952185), I hadn't thought of that positive side effect. Nice to know about unexpected improvements. :)

Cheers,

Revision history for this message
Lars Behrens (lars-behrens-u) wrote :

Am 21.03.2013 10:51, schrieb Gunnar Hjalmarsson:
> On 2013-03-21 09:30, Lars Behrens wrote:
>> And btw.: lightdm is working now, too. Last session type and language
>> getting stored.
>
> Do you mean lightdm 1.2.3-0ubuntu2 in precise-proposed?

It's lightdm 1.2.3-0ubuntu1+pam

Cheerz,
Lars

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2013-03-21 12:14, Lars Behrens wrote:
> It's lightdm 1.2.3-0ubuntu1+pam

Aha, that one in my PPA. It's the same as 1.2.3-0ubuntu2. ;-)

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

Uploaded to SRU review queue, thank you! Unsubscribing sponsors.

Revision history for this message
Lars Behrens (lars-behrens-u) wrote :

El 21.03.2013 15:30, Gunnar Hjalmarsson escribió:
> On 2013-03-21 12:14, Lars Behrens wrote:
>> It's lightdm 1.2.3-0ubuntu1+pam
>
> Aha, that one in my PPA. It's the same as 1.2.3-0ubuntu2. ;-)

Obviously there is a difference, because since today we have
1.2.3-0ubuntu2 (obviously through upgrade) and neither last users nor
user's last session settings get recorded.

I'm really starting to get tired of Ubuntu as a professionell system.

I'm trying to find your deb just to find out if the lightdm package is
the cause, but can't find it in your repo...

Cheerz,
Lars

--
Karlsruher Institut für Technologie (KIT)
Physikalisches Institut
+49 721 608-43448
<email address hidden>

Revision history for this message
Lars Behrens (lars-behrens-u) wrote :

Ok, I found it and installed it again, but the lightdm package doesn't seem to be the cause. And I found the problem doesn't occur on all of the clients. Sigh...

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Lars, or anyone else affected,

Accepted accountsservice into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/accountsservice/0.6.15-2ubuntu9.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in accountsservice (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

I have installed accountsservice 0.6.15-2ubuntu9.6 from precise-proposed, and can still change the user language without problems. The bug reporter's successful use of version 0.6.15-2ubuntu9.5+nfs in my PPA, which was built from the same source as 0.6.15-2ubuntu9.6, should be considered to verifiy that the new version actually fixes the bug as expected.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Lars Behrens (lars-behrens-u) wrote :

Bug seems fixed here with

accountsservice_0.6.15-2ubuntu9.6_amd64.deb
gir1.2-accountsservice-1.0_0.6.15-2ubuntu9.6_amd64.deb
libaccountsservice0_0.6.15-2ubuntu9.6_amd64.deb

on two machines with 3 accounts, so I assume it will work everywhere.
How do I add a tag here?

Thanks!

Just a sidenote after I finally have managed to get lightdm to remember the last users by adding "session optional pam_lastlog.so" to /etc/pam.d/lightdm, this list gets emptied out after installation of the your accountsservice package. It seems that after one more login the users stay in the list again. Would really like to now what is going on behind the scenes there.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks, Lars. The tags are right below the bug description, but I already did that. Now we just wait for someone to upload it to precise-updates. It usually takes at least a week.

The latest change in accountsservice makes it possible to set language (and regional formats) when on NFS. It has nothing to do with whether lightdm remembers the last user.

If you need to edit /etc/pam.d/lightdm as you say, isn't that a bug? If you agree, it would be great if you could file a new bug report about that particular problem.

Revision history for this message
Lars Behrens (lars-behrens-u) wrote : Re: [Bug 1156670] Re: Cannot chose language with home on nfs export

Am 15.04.2013 21:23, schrieb Gunnar Hjalmarsson:
> Thanks, Lars. The tags are right below the bug description, but I
> already did that. Now we just wait for someone to upload it to precise-
> updates. It usually takes at least a week.

Thanks!

> The latest change in accountsservice makes it possible to set language
> (and regional formats) when on NFS. It has nothing to do with whether
> lightdm remembers the last user.

Yes, one should think so. But it is like I told, which isn't a great
thing for me personally. But anyone who is dealing with real world users
knows that they are easily scared. :-)

> If you need to edit /etc/pam.d/lightdm as you say, isn't that a bug? If
> you agree, it would be great if you could file a new bug report about
> that particular problem.

Yes, sure, but I am just about to test that. I found it in an already
existing bug report anyways (which I forgot to bookmark unfortunately).

Cheerz!

Revision history for this message
Scott Kitterman (kitterman) wrote :

Gunnar: No, that's not actually sufficient. We need verification done with the packages actually going in the archive, not a predecessor package from a PPA.

tags: added: verification-needed
removed: verification-done
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

@Scott: Please note that the bug reporter successfully tested with the archive versions a few days after I wrote that (comment #18).

tags: added: verification-done
removed: verification-needed
Revision history for this message
Scott Kitterman (kitterman) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package accountsservice - 0.6.15-2ubuntu9.6

---------------
accountsservice (0.6.15-2ubuntu9.6) precise-proposed; urgency=low

  * debian/patches/0010-set-language.patch:
    Run user_HOME_available() as user in order to prevent incorrect
    failures when HOME is on NFS (LP: #1083605, LP: #1156670).
 -- Gunnar Hjalmarsson <email address hidden> Tue, 19 Mar 2013 08:32:00 +0100

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

Other bug subscribers

Remote bug watches

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