0

At some point where I wanted to do

sudo usermod -v 1000-1000 USER
sudo usermod -w 1000-1000 USER

I accidentally applied both these commands to root.

According to the documentation I can undo these commands by using the same options in capitals, but when I try

usermod -V 1000-1000 root

then I get the message: usermod: user root is currently used by process 1.

Is there another way to (un)do this?

alle_meije
  • 559
  • 2
  • 5
  • 16
  • You can just edit manually the `/etc/subuid` and `/etc/subgid` files and remove the lines that you added with your `usermod` command. Those are the files that your specific commands modified. – aviro Feb 28 '22 at 08:40
  • OK thanks! I saw that the effect of my command was that files created by root got different ownership, not 1000 but a different -higher- power of 10. Got extra cautious / scared after that. Thanks very much, will do this and check! – alle_meije Feb 28 '22 at 08:50

0 Answers0