XY: I installed bazzite and goofed up. The username is wrong and my home is /home/bazzite instead of /home/ludrol

I am trying to run usermod -l ludrol bazzite in tty3 with sudo su - but the bazzite user is logged.

Solution:
Added password to root with passwd
Logged in as root
Ran required usermod commands
Disabled root with passwd -l

  • LainTrain@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    3 months ago

    Another way to do this is sudo su -c 'this is my command

    E.g. change a fan setting on a ThinkPad with:

    sudo su -c 'echo "level full-speed" > /proc/acpi/ibm/fan'

    So to run a shell you could do all sorts of tricks like:

    sudo su -c '/bin/bash -i' and such.

    Never know when it comes in handy.