root::…
is an empty password hash. Depending on how your system is configured (is nullok
present on the auth … pam_unix.so
line in /etc/pam.conf
or the applicable file in /etc/pam.d
?), you either get no password prompt, or else no password will be accepted.
Since su
doesn't let you in, it probably isn't configured with nullok
. That's to be expected: allowing login with no password for root is highly unusual so it isn't the default configuration.
If su
or login
is configured with nullok_secure
then this allows you to log in with no password, but only on a text console. So try switching to a text console (Ctrl+Alt+F1) and logging in as root, or logging in under your normal account and running su
.
If you have sudo
set up then it doesn't care about the root password and you can still use it.
If you can't get into the root account this way, you'll have to reboot in single user mode or rescure shell mode. See What is the difference between these two ways of reseting the root password?, How to Reset Forgotten Root Password in Fedora 19 from GRUB, How can we change root password?, …
In the future, if you do anything that might affect logging in, keep a root shell open!
F7
and greater are reserved for X sessions, butF7
is only the right one if the user is the only (or first) person currently logged in, at least for Ubuntu's "Switch user" functionality. – jpaugh Oct 23 '16 at 04:50