Problems with sudo after creating a VM disk from physical drive

jamesd

New Member
Apr 2, 2023
11
0
1
Problems started as soon as I tried to run sudo x

Complained about ownership - checked and /etc/sudo.conf had was owned by the first non-root user created, not root. Also didn't have setuid.

Fixed that by mounting the disk file in another linux vm, now the same with /etc/sudoers. Fixed that, then the same with /usr/bin/sudo. Fixed that... done? No, now /usr/libexec/sudo/sudoers.so needs fixing.

The disk it was taken from - never actually used the root pw, so don't know what it is, but now can't sudo from inside its vm, so it's back and forth to the other vm with the disk file mounted there.

First, any clue how this happened? Second, anyone know what commands to run while mounting this vm disk from another vm to go through and fix all the permissions?

Thanks for helping the noob sysadmin :)
 
I thought this must have just been affecting the image I took from the SSD, but just booted a vm with the SSD as the boot disk and the image reflects the situation on the SSD (obvs I guess)

I know I booted this disk into a VM before and things were fine. Later I added it to another VM which had it's own boot VM disk. It seems doing this has screwed permissions on the SSD as it was not the case that permissions were wrong when first attaching it as a physical disk

I guess this one is toast and lesson learned
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!