Hi,
my network connection was lost while I was making do-release-upgrade (Ubuntu installation). When I logged in once again, I am no longer in the sudoers file. What can I do in this circumstances.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi Aphollo,
In that kind of circumstances, you should check all processus related to the do-release-upgrade processus. I am not sure at 100%, but I remember that the do-release-upgrade command was running inside a screen, not modifying the system until it’s been executed successfully.
So, rebooting the VM should abort the do-release-upgrade, as it will proceed in a rollback operation. You may also try to attach the screen if the user running it is the user you are using is part of an the same UNIX group or the user itself.
To avoid that kind of problem, I advice you to add an SSH key in your root account, allowing you to log as ‘root’ using ssh identication, which does not need you to be in the sudoers. The DigitalOcean admin panels proposes this solution, and it can be a good way to get out of that situation.
The other solution you can use is to include your users in the ‘wheel group’, and modify the PAM libs to allow you using the ‘su’ command if you are part of the wheel UNIX group. Here is the way you can do it, running those commands as root :
groupadd wheel
adduser 'your_user' wheel
echo "auth sufficient pam_wheel.so trust use_uid" >> /etc/pam.d/su
Then you just type ‘su’ in the shell, and you’re root ;)
I hope this information could help you to solve this issue,
Best regards,
– rustx
@rustx thanks! I managed to fix the problem by logging in as root via DO console and then issuing dpkg with proper options to finish the installation. Now everything works (almost) fine.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.