Verified: root@focal-vm:~# dpkg -l locales | grep ^ii ii locales 2.31-0ubuntu9.7 all GNU C Library: National Language (locale) data [support] root@focal-vm:~# cp /etc/default/locale /tmp/locale root@focal-vm:~# update-locale --locale-file /tmp/locale LANGUAGE = en_US.UTF-8 root@focal-vm:~# diff -u /etc/default/locale /tmp/locale --- /etc/default/locale 2022-04-19 18:07:15.583098433 +0000 +++ /tmp/locale 2022-04-26 00:56:47.140767044 +0000 @@ -1 +1,2 @@ LANG=en_US.UTF-8 += root@focal-vm:~# apt install -y -t focal-proposed libc6 locales libc-bin [snip]
root@focal-vm:~# dpkg -l locales | grep ^ii ii locales 2.31-0ubuntu9.9 all GNU C Library: National Language (locale) data [support] root@focal-vm:~# cp /etc/default/locale /tmp/locale root@focal-vm:~# update-locale --locale-file /tmp/locale LANGUAGE = en_US.UTF-8 root@focal-vm:~# diff -u /etc/default/locale /tmp/locale root@focal-vm:~# update-locale --locale-file /tmp/locale LANGUAGE=en_US.UTF-8 root@focal-vm:~# diff -u /etc/default/locale /tmp/locale --- /etc/default/locale 2022-04-26 00:58:34.429027581 +0000 +++ /tmp/locale 2022-04-26 00:58:39.333040731 +0000 @@ -1 +1,2 @@ LANG=en_US.UTF-8 +LANGUAGE=en_US.UTF-8 root@focal-vm:~# update-locale --locale-file /tmp/locale LANGUAGE=en_GB.UTF-8 root@focal-vm:~# diff -u /etc/default/locale /tmp/locale --- /etc/default/locale 2022-04-26 00:58:34.429027581 +0000 +++ /tmp/locale 2022-04-26 00:58:58.457092930 +0000 @@ -1 +1,2 @@ LANG=en_US.UTF-8 +LANGUAGE=en_GB.UTF-8 root@focal-vm:~# update-locale --locale-file /tmp/locale LANGUAGE root@focal-vm:~# diff -u /etc/default/locale /tmp/locale --- /etc/default/locale 2022-04-26 00:58:34.429027581 +0000 +++ /tmp/locale 2022-04-26 00:59:11.493129343 +0000 @@ -1 +1,2 @@ LANG=en_US.UTF-8 +#LANGUAGE=en_GB.UTF-8 ** Tags removed: verification-needed verification-needed-focal ** Tags added: verification-done-focal -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to pam in Ubuntu. https://bugs.launchpad.net/bugs/1892825 Title: update-locale not perform correctly sanity checks Status in glibc package in Ubuntu: In Progress Status in pam package in Ubuntu: New Status in glibc source package in Bionic: New Status in pam source package in Bionic: New Status in glibc source package in Focal: Fix Committed Status in pam source package in Focal: New Status in glibc source package in Hirsute: Won't Fix Status in pam source package in Hirsute: New Status in glibc source package in Impish: New Status in pam source package in Impish: New Bug description: [impact] A simple typo using the update-locale script can render a system inoperable without booting into single user mode or similar: $ sudo update-locale LANGUAGE = en_US.UTF-8 $ sudo -s sudo: pam_open_session: Bad item passed to pam_*_item() sudo: policy plugin failed session initialization [test case] $ cp /etc/default/locale /tmp/locale $ update-locale --locale-file /tmp/locale LANGUAGE = en_US.UTF-8 "diff -u /etc/default/locale /tmp/locale" should be empty. $ update-locale --locale-file /tmp/locale LANGUAGE=en_US.UTF-8 The LANGUAGE=en_US.UTF-8 line should have been replaced by LANGUAGE=en_GB.UTF-8. $ update-locale --locale-file /tmp/locale LANGUAGE The LANGUAGE setting is now commented out. [regression potential] Apart from the general concerns about a glibc rebuild, this is a simple change to a simple script. Performing the test as in the test case section is enough to ensure it still works. [original description] By passing wrong input as following: sudo update-locale LANGUAGE = en_US.UTF-8 result is: ... #LANGUAGE=en = This "equal" sign that was added makes system completely unusable(can't run sudo anymore): bentzy@bentzy-nb:~$ sudo vim /etc/default/locale sudo: pam_open_session: Bad item passed to pam_*_item() sudo: policy plugin failed session initialization Fixed it booting from installation disk and fixing corrupted /etc/default/locale ProblemType: Bug DistroRelease: Ubuntu 20.04 Package: locales 2.31-0ubuntu9 Uname: Linux 5.5.4-050504-generic x86_64 ApportVersion: 2.20.11-0ubuntu27.6 Architecture: amd64 CasperMD5CheckResult: skip CurrentDesktop: KDE Date: Tue Aug 25 09:36:03 2020 InstallationDate: Installed on 2020-08-17 (7 days ago) InstallationMedia: Kubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423) PackageArchitecture: all SourcePackage: glibc UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1892825/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp