Results 1 to 3 of 3

Thread: Locked root account can not sudo (12.3)

  1. #1

    Default Locked root account can not sudo (12.3)

    I decided to lock the root account to make it more secure (passwd -l). Earlier before this I had to log into root from the GUI (don't ask), and afterwards I decided to clean up all the GUI related config files in my root home dir. So I deleted everything in it, including the logon scripts (Wasn't thinking).
    So right now everytime I try to sudo something it says my passwords incorrect (when it is correct) and the root accounts locked.
    And when I try to boot into runlevel 1, it just boots normally with a very low resolution, is it because root is locked I wonder???

    Anyways can someone help me without having to reinstall?

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,901
    Blog Entries
    3

    Default Re: Locked root account can not sudo (12.3)

    Quote Originally Posted by steve51516 View Post
    Anyways can someone help me without having to reinstall?
    I think you can fix it by booting from a live CD or similar. Then mount your root file system, and edit "/etc/shadow" (relative to that mounted file system).

    Based on the man page, it looks as if locking the account just inserts '!' before the encrypted password field. So delete that one character, save the changed file and reboot into the system. Then test.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  3. #3

    Default Re: Locked root account can not sudo (12.3)

    Thank you.
    I went to vi /etc/shadow and the password field was blank.
    So I chrooted into the / and just unlocked the account with passwd -u.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •