8

I tried an online upgrade from 16.04.2 to 18.04.2 in February 2019, but have never been able to get beyond the initial GUI log-in that comes after grub, due to it always showing Authentication error.

Here's what I've tried so far...

3 posts to Ubuntuforums:

Noticed my GUI login username is showing with an initial capital letter whereas my correct username starts with a lower case. pressed "not shown" and tried entering correct username but had similar authentication error result.

Ctrl+Alt+F3 and try tty3 log-in: successful with lower case username

$ # brought up a small GUI display in top left hand corner of my
$ # screen, but too small to read what it said
$ sudo startex

$ # didn't fix my GUI login
$ sudo chmod 7755 /usr/lib/policykit-1/polkit-agent-helper-1

$ sudo apt install -f
0 to upgrade, 0 to newly install, 0 to remove, 5 not to upgrade

$ sudo apt-get update
fetched 432Kb in 2s

$ sudo apt-get install ubuntu-desktop
already newest version (1.417)

$ sudo apt-get install gnome-core lightdm
unable to locate package gnome-core

I've read Ask Ubuntu answers to these questions:

and all in all I've been struggling for over a month to get my ThinkPad L520's 18.04 to work without any success, so looking now for suggestions that might help me as a slow old codger with somewhat diminished cognitive abilities to get somewhere with this disabling problem.


Having worked through Simon's suggestions, I still haven't found out exactly what isn't working properly or managed to fix anything, so below, I'm feeding back the results of what I've tried in the hope of getting more suggestions

Try to fix the "5 not to upgrade" with

sudo apt-get dist-upgrade --yes

Some upgrading did take place this time, but as I was working on tty3 I couldn't make a copy of what it did. At this point I went back and tried a GUI log-in again, but no improvement; still got the same brief authentication error message flashing up as before, followed by a blank grey screen that failed to respond to anything other than a restart

Login in the console as you did with ctrl+alt+F3 and check the output of ps axf

This generated a long output list, which again I was unable to copy, but output was only in the range from 195 to 1621, so no results for 1838 to 2276.

monitor the auth and syslog and return to the login screen ctrl+alt+F1

sudo tail -f /var/log/syslog /var/log/auth.log

To see this result, I used my live 18.04 -2 DVD disk to load a LIVE session and navigated to /var/log from there.

The auth.log I found covered 2 hours of my trials and errors, so as it's 281kB I thought it best to upload it to my OneDrive cloud folder where there are also some camera pics of my GUI log-in failed attempts.

Analysing this lengthy auth.log file and trying to work out what's going wrong is beyond my ability. Hopefully uploading this auth.log will trigger some further suggestions about what to try, which I should be in a better position to personally deal with by the 2nd week of May.

  • GUI logins use your user's GECOS "fullname" which is typically different from the Unix username used for terminal login - you would have supplied both these at installation time as shown here – steeldriver Apr 15 '19 at 5:09
  • If you can access your data via succesfull login on tty3, you might be better off copying your data to an external drive and install Ubuntu from scratch, then restore the backup. – pLumo Apr 15 '19 at 7:19
  • @SleepyJohn If you want to provide further information don’t hesitate to edit your question even if you have to change it radically because of that information. Here’s the meta discussion about your proposed edit to the answer: meta.askubuntu.com/q/18552/507051 – dessert Apr 18 '19 at 7:50
  • @SleepyJohn: please add the output of cat /etc/environment to your question. – Simon Sudler Apr 18 '19 at 8:28
  • Did you try to fix the /etc/envronment file? – Simon Sudler Apr 25 '19 at 11:23
7

There are a lot of things that can go wrong when upgrading from 16.04 to 18.04. Most of this things are however easy to fix. So first you need to find what is not working properly.

Fix packages

In your post you mentioned, that apt-get returns with the following message:

$ sudo apt install -f
0 to upgrade, 0 to newly install, 0 to remove, 5 not to upgrade

Try to fix the "5 not to upgrade" with a sudo apt-get dist-upgrade --yes or remove them with sudo apt-get --purge autoremove.

Debug GUI login

Login in the console as you did with ctrl+alt+F3 and check the output of:

$ ps axf
....
1838 ?        Ssl    0:00 /usr/sbin/gdm3
1893 ?        Sl     0:00  \_ gdm-session-worker [pam/gdm-launch-environment]
2213 tty1     Ssl+   0:00  |   \_ /usr/lib/gdm3/gdm-wayland-session gnome-session --autostart /usr/share/gdm/greeter/autostart
2252 tty1     Sl+    0:00  |       \_ /usr/lib/gnome-session/gnome-session-binary --autostart /usr/share/gdm/greeter/autostart
2276 tty1     Sl+    0:02  |           \_ /usr/bin/gnome-shell
....

In a standard Ubuntu installation (with gnome), the gdm-session-worker should be running and provides the login screen. (You can scroll up/down with shift+pageup/pagedown)

Then monitor the auth and syslog and return to the login screen ctrl+alt+F1

sudo tail -f /var/log/syslog /var/log/auth.log

After the login failed, return to the console (again ctrl+alt+F3) and check the output for error messages. That should give you a hint where to look next.

Fix /etc/environment file

When looking into the output of your /var/log/auth.log file, you find a reoccurring message:

Apr 17 10:05:16 TP-L520 gdm-launch-environment]: pam_env(gdm-launch-environment:session): non-alphanumeric key 'date +%d.%m.%Y' in /etc/environment', ignoring
Apr 17 10:05:16 TP-L520 gdm-launch-environment]: pam_unix(gdm-launch-environment:session): session opened for user gdm by (uid=0)
Apr 17 10:05:16 TP-L520 systemd-logind[945]: New session c56 of user gdm.
Apr 17 10:05:16 TP-L520 gdm-launch-environment]: pam_unix(gdm-launch-environment:session): session closed for user gdm
Apr 17 10:05:16 TP-L520 systemd-logind[945]: Removed session c56.

It seams that there is a problem with some date command inside the /etc/enviroment file. A simple fix would be to backup that file and replace it if the standard values:

$ sudo cp /etc/environment /etc/environment.backup
$ echo 'PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"' | sudo tee /etc/environment

Reboot and try again.

|improve this answer|||||
  • Answers much appreciated , thanks. Could be a few days before I get to trying them out now though 'cos I've got to pack and leave the country – Sleepy John Apr 16 '19 at 5:00
0

Hope this will help

  1. Ctrl+Alt+F3 and try tty3 log-in:

  2. After that change the username in /etc/passwd e.g if your username is pradip then change it to Pradip.

  3. Then change password for same using sudo passwd new_username

  4. Try to sign in

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.