Results 1 to 7 of 7

Thread: Leap 15.0 Changing root password to Nothing

  1. #1

    Red face Leap 15.0 Changing root password to Nothing

    I was wondering if there was a way to change my root password so that when I type su I can just type enter to log into root. I tried "passwd -d root" and when I tried to log into root it didn't work. I just want root password to be nothing so I can just hit enter when it prompts me for password. I know its possible because i've done it on other versions of openSUSE before maybe for regular log ins or something I don't remember but that is what I want. Also what did passwd -d root do because I had to reboot my computer and edit grub to boot linux with the init=/bin/bash option then type mount -n -o remount,rw / and then I could change the passwd with passwd root. But was there a way to remedy that problem without booting? why did passwd -d root break my computer? anyways thanks that's what I want is no root password.

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

    Default Re: Leap 15.0 Changing root password to Nothing

    Quote Originally Posted by errigour View Post
    I just want root password to be nothing so I can just hit enter when it prompts me for password.
    That has not worked for quite a while.

    I'm not sure what the trick is, but the live media still works with an empty root password. Perhaps something on the pam stack is disallowing empty root passwords.

    It has been several years since I last tried doing that. And it didn't work back whenever I last tried it.

    Also what did passwd -d root do because I had to reboot my computer and edit grub to boot linux with the init=/bin/bash option then type mount -n -o remount,rw / and then I could change the passwd with passwd root.
    It did what you wanted. But there seems to be something else that is disallowing a root login without password.

    But was there a way to remedy that problem without booting?
    That was not a problem for me when I just tested. But that's because I had a root command prompt still available, while I tested "su" from a different terminal window. If I had just rebooted, I might have had problems. However, I could possibly still have used "ssh" to login to root with public key authentication (I did already have that configured).

    Somebody will probably reply with the lecture on why what you want is a bad idea.
    openSUSE Leap 15.1; KDE Plasma 5;

  3. #3
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,341
    Blog Entries
    15

    Default Re: Leap 15.0 Changing root password to Nothing

    Hi
    Easier to setup sudo for your user....

    Code:
    su -
    visudo
    <username> ALL = NOPASSWD: ALL
    Then use;
    Code:
    sudo -s
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  4. #4
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,423

    Question Re: Leap 15.0 Changing root password to Nothing

    Quote Originally Posted by nrickert View Post
    Somebody will probably reply with the lecture on why what you want is a bad idea.
    Why?
    • So long as, it's impossible to login as the user “root” via the network and, the only “root” user login that's possible is to be physically located at the machine's console – which may be physically locked away in a secure cage in a very secure computer centre – there're several scenarios where a “null” password for the user “root” make sense …


    BTW: it seems that, if the user's password is deleted and then locked, the value is changed to something which doesn't match anything …
    Code:
     # passwd --delete root
     # passwd --lock root
    Be aware that, the default SSH daemon configuration value for ‘PermitEmptyPasswords’ is “no”.
    • Amazingly, the default for ‘PermitRootLogin’ is “yes” !!!
    • But the SSH daemon configuration file does have a comment regarding PAM and the “PermitRootLogin without-password” setting …

  5. #5
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,423

    Exclamation Re: Leap 15.0 Changing root password to Nothing

    @errigour:

    One more thing: before you begin to change the password of the user “root”, it's a good idea to setup and administrator account:
    • User Group: “root”.
    • User ID value less than 99.

  6. #6

    Thumbs up Re: Leap 15.0 Changing root password to Nothing

    Ok thanks for all the replies.

  7. #7
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    830

    Default Re: Leap 15.0 Changing root password to Nothing

    Quote Originally Posted by errigour View Post
    I was wondering if there was a way to change my root password so that when I type su I can just type enter to log into root. I tried "passwd -d root" and when I tried to log into root it didn't work. I just want root password to be nothing so I can just hit enter when it prompts me for password. I know its possible because i've done it on other versions of openSUSE before maybe for regular log ins or something I don't remember but that is what I want. Also what did passwd -d root do because I had to reboot my computer and edit grub to boot linux with the init=/bin/bash option then type mount -n -o remount,rw / and then I could change the passwd with passwd root. But was there a way to remedy that problem without booting? why did passwd -d root break my computer? anyways thanks that's what I want is no root password.
    You may backup /etc/shadow and clear out the encrypted password as follows:

    root::17114::::::
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

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
  •