LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   can I unlock the root account? (https://www.linuxquestions.org/questions/ubuntu-63/can-i-unlock-the-root-account-757306/)

newbiesforever 09-23-2009 12:50 PM

can I unlock the root account?
 
I've heard that the root account in Ubuntu is locked by default. Can that be undone? I don't go into the root account often, but who are the Ubuntu designers to tell me I can't?--it's my system.

repo 09-23-2009 12:55 PM

Why don't you use sudo ?
However,
Use
Code:

sudo passwd root
take a look at
https://help.ubuntu.com/community/RootSudo

newbiesforever 09-23-2009 12:58 PM

It's strictly the principle, you understand. I would use sudo.

Crito 09-23-2009 09:53 PM

Mind you I'm a Ubuntu newbie and I haven't done this myself, but from locking and unlocking accounts on other distros I believe the trick is removing the ! or * symbol in the /etc/shadow file.

Wim Sturkenboom 09-24-2009 01:13 AM

Crito, when doing that you still don't know the root password. And that trick can be done using the -u option in the password command.

This is the default line in Ubuntu Netbook Remix
Code:

root:!:14474:0:99999:7:::

Wim Sturkenboom 09-24-2009 01:24 AM

newbiesforever, it's their approach to a problem (users forgetting their root password or working as root all the time). If you don't like their approach, fix it with the solution given earlier or use another distro.

It's their freedom to do so and it's your freedom to like it or not ;)

PS a lot of distros nowadays don't allow you to login as root account in the graphical environment.

tommcd 09-24-2009 05:21 AM

Enabling the root account is not recommended in Ubuntu.
https://help.ubuntu.com/community/RootSudo
If you want to use a root terminal in Ubuntu use sudo -i as discussed at the end of that article.
https://help.ubuntu.com/community/Ro...20and%20shells
Many people who enable the root account in Ubuntu run into problems. I suspect that this is likely caused by inexperience with using a root account in linux though, or possibly running the system as root. I have always used sudo in Ubuntu without any problems.
Even telling someone how to enable the root account on the Ubuntu forums will get you severely chastised by the forum moderators.

newbiesforever 09-24-2009 11:49 AM

Quote:

newbiesforever, it's their approach to a problem (users forgetting their root password or working as root all the time).
I think that either Ubuntu overestimates the number of users ignorant enough to work as root all the time (which doesn't include me), or I underestimate it.

Quote:

Originally Posted by Wim Sturkenboom (Post 3695140)
PS a lot of distros nowadays don't allow you to login as root account in the graphical environment.

Which distros would those be? I haven't noticed that on any of the distros I've used.

Quote:

Originally Posted by tommcd (Post 3695318)
Even telling someone how to enable the root account on the Ubuntu forums will get you severely chastised by the forum moderators.

That's terrible. You're talking about telling someone how to do something, not recommending that they do it. Ubuntu is the only distro I know of that has forbidden knowledge.

Quote:

Many people who enable the root account in Ubuntu run into problems. I suspect that this is likely caused by inexperience with using a root account in linux though, or possibly running the system as root.
That doesn't suggest that there are any special problems caused by using the root account in Ubuntu as opposed to using it in other distros.

tommcd 09-25-2009 06:00 AM

Quote:

Originally Posted by newbiesforever (Post 3695730)
That's terrible. You're talking about telling someone how to do something, not recommending that they do it. Ubuntu is the only distro I know of that has forbidden knowledge.

I don't agree with that policy either. There have been cases where someone asked how to enable the root account, and some well meaning person then gives them the answer. They are then quite surprised (and justifiably so imo) when they receive an infraction from the Ubuntu forum mods for doing so.

pixellany 09-25-2009 06:18 AM

Probably anticlimactic, but I approached a Ubuntu rep. at the last SCALE in Los Angeles. He spoke eloquently about how their policy increases security. It was not convincing.

If you enable root as described here, you will still need to put in your user password when attempting to do something requiring admin privileges (eg open Synaptic). This gets confusing in a hurry.

My solution has been to not use Ubuntu or its progeny (too bad, because I really like Mint)....YMMV

newbiesforever 09-25-2009 03:49 PM

I hear you. I'll have to find another distro. I need to leave MEPIS, because certain aspects of it aren't up to Ubuntu standards (so far, I've found *two things I need or could benefit from that Ubuntu has but MEPIS doesn't), but I can probably find another distro that has those things but doesn't treat users like a child regarding the root account.

*1. Ubuntu apparently comes with an open-source driver for my wireless access point, making ndiswrapper unnecessary.
2. *MEPIS 8 is missing something that is necessary to use all features of my online classroom. (This is extremely important, because I'm in graduate school.) I'm pretty sure it's something Java-related, but I haven't figured out exactly what. Ubuntu has some of the problem fixed--some of the parts of my online classroom that don't work in MEPIS work in Ubuntu, but not all.

This isn't going to significantly interfere with Ubuntu's winning over newbies everywhere as it seemingly has been doing, because most newbies probably don't care much about this issue. Unless they're like me--people who are, or once were, on the periphery of computer nerdhood. (I was there back in the late eighties and early nineties, when computers were less complicated. Now, far from being any sort of computer nerd, I am a writer and liberal arts student, impatient with computers and generally not interested in how they work.)

Wim Sturkenboom 09-26-2009 01:53 AM

Quote:

Originally Posted by newbiesforever (Post 3695730)
I think that either Ubuntu overestimates the number of users ignorant enough to work as root all the time (which doesn't include me), or I underestimate it.

Lots of people coming from a Windows environment (up to XP) don't know about privileged users and unprivileged users. I think that Ubuntu is right in their approach for these users.

Quote:

Originally Posted by newbiesforever (Post 3695730)
Which distros would those be? I haven't noticed that on any of the distros I've used.

Do a search for can't login as root. I'm not sure which ones, I seem to remember that I encountered it in an older Slackware (10.x).

I don't experience Ubuntu's approach as a disadvantage. The advantage that I see is that 'root' is a known system user and therefore prone to attacks. I however see one major advantage in having a 'root' account and that is that a crashed home partition still allows root to login to a fully functional system because root's home directory is not on the home partition. In Ubuntu one has to go to recovery mode and I'm not sure if that's fully functional (usb and networking come to mind)

Crito 09-27-2009 01:35 PM

Enabling root in Ubuntu is even easier than that.

Just press esc during boot and select recovery mode. Then scroll down to shell without networking. That'll drop you into single user mode as root where all you need to do is run the passwd command (no switches/parms required). You won't be prompted for the old password and you won't have to edit /etc/shadow.

EDIT: And I've actually done it myself this time. ;)

newbiesforever 09-27-2009 04:17 PM

Thanks. I wonder if any Ubuntu forum moderators will read that and, if so, whether they would even scold a senior LQ member for sharing the forbidden knowledge.

catkin 09-27-2009 04:32 PM

When I first installed ubuntu I messed about using sudo to run commands for at least 30 seconds before running sudo passwd root and the next thing I did was find out how to set up a launcher on the panel for a root terminal. Now I'm in the habit of having a root terminal open pretty much all the time.

So -- ubuntu's root account policy is no reason to ditch ubuntu. There may be other reasons (it's a personal thing) but that's not one of them unless you plain don't like their attitude (or, more politely, design goals).


All times are GMT -5. The time now is 02:56 PM.