I'm running Debian in a virtual machine and for convenience I would like to remove the password on root (since it doesn't really matter what happens to this box). Internet hasn't been too helpful on this one, which I suppose is OK because this is not normally something you'd want to do!
I tried passwd -d root, but su won't accept the empty password. I assume there is some sort of PAM policy blocking me, but I haven't been able to find a working solution. Any help appreciated!
(Just to clarify: I don't want to always run as root. I'd like a little bit of accident proofing in case I spaz out and rm -rf /
. Just, when I'm ready to run as root, I don't want to be second guessed.)
Edit: I also know about the sudoers hack. I'm just curious to find out what in Debian is blocking this.
Best Answer
I totally agree this is a bad thing to do. But it can be done in debian by doing as you have done
passwd -d root
to clear the password then editing/etc/pam.d/common-auth
. Find thepam_unix.so
line and addnullok
to the end if its not there or changenullok_secure
to be justnullok
if yours saysnullok_secure
.This works on Debian Wheezy (and Squeeze).