AFAIK, you need to modify the PAM configuration to allow passwordless login.
This should do I think:
sudo pam-config -a --nullok
See also “man pam-config”.
If you want to login to a graphical system without a password, you may have to adjust your display manager’s config too.
Most should respect the settings DISPLAYMANAGER_PASSWORD_LESS_LOGIN=“yes” in /etc/sysconfig/displaymanager, I suppose.
You deleted the old password, so the system doesn’t know anything about it any more.
What if you just press enter when asked for the password?
Is there some kind of fallback password that is set?
Not if you deleted the password.
Maybe “su -” still works? (probably not though)
If all else fails, press ‘e’ at the boot menu and append “init=/bin/sh” to the line starting with “linux” or “linuxefi”, then press ‘F10’ to boot.
You should get to a minimal text mode system then, where you should be able to change the root password again with “passwd”.
The above is another question then the original one (as given in the title and discused in the posts). Please do not try to hyjack the thread. Also, when you start a new thread, with a good title that covers your question, there will be more chance that the people you need will see your question.
2. Set Root Password to null
I’d recommend a different approach to setting up a no-password root account when handing your machine to some techs… For one thing, once you get your machine back you’ll have to undo your modifications. Instead I recommend setting the root password to something stupid and simple like
Then write that down on a 3M sticky note and stick on your keyboard or display with the lid closed so it doesn’t get lost.
Note that root is likely mounted read-only at this point, so at the very least one need to make /etc writable by using “mount -o remount,rw /”. Alternative is to use “passwd -R” from live boot after mounting real root.
Oh, and as long as we are on openSUSE - yet another alternative is to revert to snapshot before password was deleted
Hi, didn’t have my system for a while now, sorry. So, basically I told the guys that I locked myself out. They just installed openSuse again. Now, everything is working again, but wouldn’t it make sense to have a warning before deleting the root password? I mean not a “this is a security issue” warning, but more like a “this will not work” warning. To the solution above: Just trying to log in with empty password did not work. I tried that too. Best Marc
This has nothing to do with “legality”. And I am sure tht the command did exactly as described: it removed the root password from /etc/shadow. Remember that Unix/Linux does what you tell it to do, not what you want it to do.
The passwd tool has no knowledge of the usage of PAM. The caveat is that when reading the man page of a tool, one only gets the very technical description about what the command does and what the otions are, etc. do. There is normaly verry little documentation about the environment a tool is supposed to work within or the wider knowledge that is assmed to be available to the user through courses, books or try and error…
Man pages assume that you have some deeper Unix/Linux knowledge, they often are more of a help to people who know what tool to use in what circumstances, but who can not remiind how exactly the syntax or options are.
For many of these cases that are to be done on a day to day frequency by many people there are tools (often GUI oriented) like YaST, that offer an higher abstract level and then “know” where to change what.