Upgrade from 20.04 to 22.04 fails, missing gdm-password file

I finally tried to upgrade from Ubuntu 20.04 LTS to 22.04 LTS. Unfortunately, update manager fails to complete the process. When I run the update-manager manually I get the following error message:

FileNotFoundError: [Errno 2] No such file or directory: ‘/etc/pam.d/gdm-password’

When I check the above mentioned folder, there is a symlink gdm-password → gdm but there is no actual gdm -file. There is, however, a file named gdm-password.dpkg-new from the year 2020. This is probably from when I upgraded from 18.04 to 20.04. Is this just a naming problem or something else?

Can anyone help me with this error? My system seems to be working fine without this gdm-password -file. Only the upgrade fails.

To be complete, I have already done

sudo apt update && sudo apt upgrade

and there seems to be no package related problems. Only this gmd-password error remains.

hmm - welcome!

GDM is 22.04 is really only to be used with GNOME Shell. It has well known issues with Budgie - it can and does break the lock screen and sometimes shortcut keys. It is strongly recommended NOT to have both gnome-shell and budgie both installed at the same time. If you don’t use gnome-shell anymore then removing the package gnome-shell-common is recommended.

Our defaults are both lightdm and slick-greeter.

1 Like

Thank you for your answer!

I’m not sure if I need gnome-shell, but since I’m using Mate desktop I suppose I do. At one point I tried lightdm but there were some problems with Mate. I don’t remember the details anymore but I had to switch back. I guess I should play it safe and stay with 20.04 LTS. Fortunately it has a long support duration.

Thats a little odd - Ubuntu Mate also uses lightdm - just a different greeter.

N.B. its a case of using any login manager - except for GDM3. For example, sddm, lxdm or even kdm.

1 Like

You’re right. I tried

cat /etc/X11/default-display-manager

and it tells me /usr/sbin/lightdm. So I am using lightdm, right?

Does this mean I can just remove gnome-shell-common without any problems? How can I be sure if I need this or not?

correct - you are using lightdm.

You can just do sudo apt remove gnome-shell-common but don’t press “y” to continue until you verify that all the associated packages it says that will be removed, you don’t need. N.B. gnome-shell-common is only used by GNOME Shell - no other desktop environments such as Mate and Budgie.

1 Like

This is what I get. Does this look safe? Only things that I’m not sure about are gnome-session and ubuntu-session, what are these? I think it was gdm3 I tried years ago and it didn’t work. Maybe these are leftovers from there?

The following packages were automatically installed and are no longer required:
fprintd gir1.2-gck-1 gir1.2-gcr-3 gir1.2-gdesktopenums-3.0 gir1.2-gdm-1.0
gir1.2-geoclue-2.0 gir1.2-gnomedesktop-3.0 gir1.2-graphene-1.0
gir1.2-gweather-3.0 gir1.2-handy-0.0 gir1.2-mutter-6 gir1.2-nma-1.0
gir1.2-rsvg-2.0 gir1.2-upowerglib-1.0 gjs libfprint-2-2 libgdm1 libgjs0g
libmozjs-68-0 libpam-fprintd switcheroo-control xwayland
yaru-theme-gnome-shell
Use ‘sudo apt autoremove’ to remove them.
The following packages will be REMOVED:
chrome-gnome-shell gdm3 gnome-session gnome-shell gnome-shell-common
gnome-shell-extension-appindicator gnome-shell-extension-prefs
gnome-shell-extension-ubuntu-dock gnome-tweak-tool gnome-tweaks
ubuntu-session
0 upgraded, 0 newly installed, 11 to remove and 0 not upgraded.

That looks fine. They are all gnome-shell specifics. The older stuff like “gir1.2-mutter-6” are the leftovers from 20.04 - you can sudo apt autoremove those afterwards.

N.B. Budgie specifically uses “gnome-session-bin” - not the gnome-session package. That isn’t mentioned in that list so thats good news.

gnome-session and ubuntu-session are the options you see to log into the vanilla gnome-shell desktop or the customised ubuntu version of gnome-shell

I removed gnome-shell-common and tried the upgrade again. Unfortunately, I still get the same error message about the missing gdm-password file.

To be sure, I rebooted and did sudo apt update && sudo apt upgrade again, but no help there. Any more ideas what I could try?

That is from the gdm3 package - so that should have been removed when you removed gnome-shell(-common)

Lets double check - what is the output of the following:

sudo apt update
sudo apt autoremove
sudo apt full-upgrade
sudo apt purge gdm3

sudo apt update

All packages are up to date.

sudo apt autoremove

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

sudo apt full-upgrade

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

sudo apt purge gdm3

The following packages will be REMOVED:
gdm3*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.

I removed this, but still the same error message. In other forum it is suggested to reinstall gdm3, but is this a good idea if there are known conficts with 22.04?

https://askubuntu.com/questions/1473462/upgrade-from-20-04-to-22-04-fails-missing-gdm-password-file

Now I noticed there was an error message when trying to remove gdm3. So should I just remove everything from this folder manually and then try again?

Removing user gdm' ... Warning: group gdm’ has no more members.
Done.
dpkg: warning: while removing gdm3, directory ‘/etc/gdm3’ not empty so not removed

Yep - should be fine to remove

sudo apt remove gdm3 
sudo apt autoremove

sudo rm -rf /etc/gdm3
sudo rm /etc/pam.d/gdm-password
1 Like

Now we are getting somewhere :slight_smile: Now the error message changed to

FileNotFoundError: [Errno 2] No such file or directory: ‘/etc/pam.d/gdm-launch-environment’

This is again a symlink that is directing to a non-existent file gdm-launch-environment → gdm-autologin. So I guess I can just?
sudo rm /etc/pam.d/gdm-launch-environment

yep - anything with “gdm” in its name is safe to remove.

Success! Now the update manager continued to next stages. Thank you very much for your help! :slight_smile:

1 Like