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.
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.
Hi
Easier to setup sudo for your user…
su -
visudo
<username> ALL = NOPASSWD: ALL
Then use;
sudo -s
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 … >:)
[HR][/HR]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 …
# 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 …
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.
One more thing: before you begin to change the password of the user “root”, it’s a good idea to setup an administrator account:
- User Group: “root”.
- User ID value less than 99.
Ok thanks for all the replies.
You may backup /etc/shadow and clear out the encrypted password as follows:
root::17114::::::