Username and host name changed after upgrade. Sudo keeps working and then not working
by TaoMao from LinuxQuestions.org on (#6QEKR)
Ubuntu 24.04.01 LTS
Upgraded from 22.04.01
Dell precision 7550
Notification received to upgrade and did so.
It said some things were partially upgraded, but everything was working normally for a day.
updated firmware. everything seemed fine.
Suddenly couldn't connect to internet - suspect this is connected.to the vpn and this happened before with proton.
Visited terminal and noticed username and host name different. Username has changed by one letter and now the host name says 127 as opposed to what it should be.
Sudo command output:
Code:Sudo: unable to resolve host 127.0.01localhost :Temporary failure in name resolutionUsed the command:
Code: hostnamectlPretty hostname shows my old, correct, username and hostname.
Static hostname has no space between ip and localhost.
An hour later internet and sudo commands worked again.
they then stopped working.
Then the sudo command now outputs the same error output as listed above, but then it will execute the command successfully
Upgraded from 22.04.01
Dell precision 7550
Notification received to upgrade and did so.
It said some things were partially upgraded, but everything was working normally for a day.
updated firmware. everything seemed fine.
Suddenly couldn't connect to internet - suspect this is connected.to the vpn and this happened before with proton.
Visited terminal and noticed username and host name different. Username has changed by one letter and now the host name says 127 as opposed to what it should be.
Sudo command output:
Code:Sudo: unable to resolve host 127.0.01localhost :Temporary failure in name resolutionUsed the command:
Code: hostnamectlPretty hostname shows my old, correct, username and hostname.
Static hostname has no space between ip and localhost.
An hour later internet and sudo commands worked again.
they then stopped working.
Then the sudo command now outputs the same error output as listed above, but then it will execute the command successfully