[SOLVED] Cannot log in, or use, as root in new clean Debian Wheezy installs.
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900
Rep:
Cannot log in, or use, as root in new clean Debian Wheezy installs.
I have just done a series of totally clean (new /home and all) installs and using expert install allowed creation of a root password (not sudo) on 3 of the 4 installs. The installs where I allowed a root password so I could log in as root, either from a non gui cli or a root terminal, will not allow me to log in or do anything as root. The install (the one I am currently posting from) that I allow sudo acess, via expert install mode, works as it should.
Is this a known bug? Is there a work around that does not involve allowing sudo access?
Debian by design does not want you to login directly as root. It wants you to use sudo or authenticate as a normal user and use su - to switch. Does logging in as a normal user allow you to use su - and the password you set to switch to root?
You can do some searching on the debian forums for "no root login" and see all of the similar postings for this functionality.
Never had that problem, always been doing custom/expert install, even with several installs of Whezzy in different machines never had that problem. Now when you are setting the password there is an option where it ask if you want to allow login as root, say yes there.
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900
Original Poster
Rep:
Quote:
Originally Posted by Kustom42
Debian by design does not want you to login directly as root.
I have always been able to use root in Debian.
Quote:
Originally Posted by Kustom42
It wants you to use sudo or authenticate as a normal user and use su - to switch.
I know, but this does not answer my question.
Quote:
Originally Posted by Kustom42
Does logging in as a normal user allow you to use su - and the password you set to switch to root?
No, I cannot use it at all. Thus the question is it a bug or something because it has always worked for me until now.
Quote:
Originally Posted by Kustom42
You can do some searching on the debian forums for "no root login" and see all of the similar postings for this functionality.
I know and I did Google but Google isn't as good as it likes to think it is. The posts on both Debian Forums seem to be about Squeeze not Wheezy and the solutions given didn't work either.
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900
Original Poster
Rep:
Quote:
Originally Posted by ukiuki
Never had that problem, always been doing custom/expert install, even with several installs of Whezzy in different machines never had that problem. Now when you are setting the password there is an option where it ask if you want to allow login as root, say yes there.
Regards
I did that. The page asks if you want shadow passwords, I say No, then asks for Root and I say Yes. I then type in the password I use for Root twice and continue the install. Then when I test the install to make sure everythign is working my root password will not let me login as root or use "su" or "su -".
Have you checked if your keymap is OK? (The keyboard layout used during installation might be different to that of the installed system). Also, what is the exact error you get when trying to login as root? You can check the logs to see if there's something relevant there. If you're sure your keymap is the correct one, you can boot in recovery mode (or chroot your Debian install) and use passwd to change your root password.
Regarding the keymap theory, If the keymap somehow changed wouldn't that apply to my "normal user" password as well?
Yes, I guess it would apply to your normal user as well, though it may depend on how different both keymaps are and on the passwords too (if for example you have a "qwerty" keyboard, but use an "azerty" keymap, some keys are the same, so a password like "erty123" would be the same in both keymaps).
Regarding your problem, a web search returned similar issues when /bin/su doesn't have the setuid bit set for some reason (take a look at this link for more info). In case it is set but you still have the same problem, maybe this will work (after booting in recovery mode or from a chroot terminal):
Code:
passwd root
Last edited by Hungry ghost; 06-19-2013 at 09:44 PM.
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900
Original Poster
Rep:
I chrooted into the gnome system and changed the password. It now works as it should. I'll do some more research on it before I report a bug but my gut feeling is it is a bug. Each install was done from DVD1 multiarch built using jigdo. I'll see if the same thing happens using DebianLive.
Yes, I guess it's quite possible it's a bug (it surprises me there are not related bug reports at bugs.debian.org already -- or at least I couldn't find one -- but who knows).
I did that. The page asks if you want shadow passwords, I say No, then asks for Root and I say Yes. I then type in the password I use for Root twice and continue the install. Then when I test the install to make sure everythign is working my root password will not let me login as root or use "su" or "su -".
Try with shadow on, maybe there is where the bug lies.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.