Linux Mint Forums

Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.Before you post please read how to get help

I've done a fresh install of LMDE, ran an upgrade, and tried to set up a root account the usual way - using "passwd root" to establish a password for login.

I am still not able to login as root, I get "authentication error". It's not a spelling problem, I've re-done it several times, no luck with any of them.

I verified that /root/ is only accessible by root, root is also in sudoers, and now I'm stuck - I don't know what the problem is. Any help will be greatly appreciated.

I've also added my normal account to sudoers with visudo, with the parm that used to let it use sudo without being prompted for a password (myuserid ALL=(ALL) NOPASSWD:ALL) and - I still get prompted for passwords. This is also a change from prior Mint distros. Any info about this?

I've used root authority for administrative work for 20 years (on mainframes before linux), I do know how to be careful with it, and I do understand how to avoid corrupting my normal account with root access. So advising me to stop using root is not helpful, since some work is best done while logged in as root.

Last edited by EdgarManhattan on Wed Dec 15, 2010 9:23 pm, edited 2 times in total.

Hmmm...strange! After logging into Gnome with a non-root user, and then opening a terminal shell, I can login as 'root' just fine. It appears as though after a fresh install, the password for 'root' has been automatically set to be the same (?) as the non-root user account created during the install. At that point, for security reasons, I just change it to something else (similar to what you said) by using 'passwd' after signing on as 'root' for the first time.

Now, ever since I have started using Linux (back in the mid 90's) I have *always* used 'root' as my primary account -- even when logging into the desktop. Yes, I realize that this is a bad practice, but it was so very convenient More recently, distros have been taking steps to prevent me from doing this (again for good reasons). Well, I have given in -- and I am making a conscious effort to wean myself off this -- starting with LMDE! As an intellectual curiosity, though, I now know how to turn 'off' that protection

Hmmm. I'm not sure what you are doing, exactly. I've never used login from a terminal while I was already logged in as another user - but tried it and, no it's not letting me do it as root. It' just says "login incorrect". It lets me re-log in as my normal non-root user.

Sudo and gksu are working fine, although it's irritating that I can no longer bypass the password requirement.

I wonder if the distro developers who are making it so hard for normal users to use root these days ever log in as root themselves. I would be very surprised if they don't ever log in as root.

EdgarManhattan wrote:Hmmm. I'm not sure what you are doing, exactly. I've never used login from a terminal while I was already logged in as another user - but tried it and, no it's not letting me do it as root. It' just says "login incorrect". It lets me re-log in as my normal non-root user.

Just to clarify, here are the three ways that I commonly 'login as root', just so you can point out which one is giving you trouble:

1) At the 'gdm' GUI prompt after booting LMDE. For me, it presents 'darren' as the (currently) only user I can login with, but gives me the choice of other names (I suppose). Until my little experiment today, attempting to use 'root' would have been refused.

2) After successfully logging into my Gnome desktop as 'darren', and then starting a terminal shell (e.g. 'gnome-terminal') I can then re-login as other users -- including 'root'. For root, I would type 'su - root'. It would prompt for root's password, and then login as such if the password is correct. If the password is wrong, I will get the message 'su: Authentication failure' (notice, NOT 'login incorrect').

3) From a remote machine, after 'sshd' has been correctly configured, I can start a remote connection in my terminal session using 'root' if I want to as well i.e. 'ssh root@remotemachine'. Again, prompts for password, etc..

specmod0 wrote:I am not able to login to the root from the login page either... this sucks.

Just to be clear, I believe that this is *intentional*. Yes, there are ways to turn off this 'protection' if you really want to -- but I am trying to avoid the temptation from now on. In fact, one of the 'hair-pulling' things that pushed me that way is that you cannot (easily) run 'vlc' as root anymore.

Just to clarify, here are the three ways that I commonly 'login as root', just so you can point out which one is giving you trouble:

I tried su - root and yes, it allows me to become root that way in a terminal - thanks! That verifies that yes, I did change the root password correctly. What I am after, though, is your option 2) logging in at the 'gdm' GUI prompt after booting LMDE. I want to be able to go into an X session as root, for those times when I am doing a lot of rootish things because something else (like another OS instance) has broken for some reason.

I can always, of course, boot up in Puppy, where I am always root, and do stuff - Puppy has saved me any number of times. But I prefer the set of tools I've got in Mint, I'm more used to them.

And yes, it's irritating that VLC doesn't work when you're root! I usually run all my sound through my main computer, but I got tired of having nothing to listen to while I'm doing new OS installs or whatever. So I took an old laptop with a broken case, opened it flat, modified it with some epoxy putty and some hooks, plugged in an old wifi dongle, hung it on the wall and plugged it into the tuner. It serves as a backup media center, runs VLC just fine, and adds that essential touch of creative geekiness that every home needs!

What I am after, though, is your option 2) logging in at the 'gdm' GUI prompt after booting LMDE. I want to be able to go into an X session as root, for those times when I am doing a lot of rootish things because something else (like another OS instance) has broken for some reason.

OK, at your own risk, try this to allow a 'root' login to the Gnome desktop: edit (as 'root' of course) the '/etc/pam.d/gdm3' file. Comment out the following line:

I again caution you to avoid this if possible, or at least use it 'sparingly'. So far, my own 'weaning' process is working quite well -- I am surprised at how 'rare' it is to even require 'root' access -- especially not on the desktop itself

Thanks! That worked, I now have root access again. I do use it rarely, since I understand the potential damage I could accidentally do with root - but it's another tool we have that's useful sometimes, and tools are good things.

For those following after who will use this - good for you! But, for those new to this, with authority comes responsibility - you can mess up your system much more easily now, and then it will be up to you to recover.

The simplest way to preserve the work you've done customizing your system? BACK UP YOUR ENTIRE OS PARTITION every now and then to preserve a base point you can recover from, and regularly, nightly, back up your home directory. Then, if you kill your system beyond your ability to recover it, you can boot up the live cd or other OS where you can get root authority and just overlay all the system directories with the latest backup.

Check out rdiff-backup, a very useful backup tool - you can use it in a script which you can put into /etc/chron.daily for automatic backups. Because different people have different configurations of hard drives, and use different places to mount their non-system files, you'll need to do a bit of research into backups to get it right for you - but the copy command from a script or terminal: cp -a <from directory> <to directory> is very useful, the -a is essential for preserving permissions. And logging into a different OS to copy your system folders is also essential, or you will have problems copying files that have system locks on them while the OS is running. That can be done from the LMDE live CD.