LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Terminal Root.... (https://www.linuxquestions.org/questions/ubuntu-63/terminal-root-526532/)

jymmi 02-07-2007 05:21 PM

Terminal Root....
 
(Ubuntu 6.06 LTS)

When I go to Terminal, I see the following:

james@james-Desktop....

Now when I type su, it will ask for password, I type in my password that I created during installation, and for some reason, it will say that it is invalid.

Is this because I am already login as Root?

Thanks...

fukawi2 02-07-2007 05:29 PM

Ubuntu doesn't assign a password to the root account by default, which means the account is not available. You need to use the sudo command instead.

To login as root at the terminal:
Code:

sudo su -
To assign a password to root so you can su 'as normal':
Code:

sudo passwd root
Don't forget when sudo asks for password, that's YOUR password, not root's password :)

jymmi 02-07-2007 05:51 PM

ahhhhhhhhhhhh
 
I did try sudo as well, but it would give me the help listing of add on commands.

That would explain it then.

Will try for sure.

Thanks...

fragos 02-07-2007 06:14 PM

su vs sudo is one of those things that linux lovers love to argue over. Ubuntu believes that entering sudo before each command improves security because the machine isn't left in root state. I came from SuSE and "su". At first sudo seemed a little strange because it was different than what I'd become accustomed to. I'm now quite comfortable with sudo. One thing you may not realize is that when you use a series of commands with sudo, only the first asks for the password. There's a timer on this, perhaps 15 minutes. I recommend you try things the Ubuntu way to experience it before breaking with what the distribution creators recommend. Along that same issue, I recommend that you become familiar with Synaptic and Ubuntu repositories before becoming dependent on CLI methods like apt-get.

fukawi2 02-07-2007 06:23 PM

Here here... Couldn't agree more. :)

I think the timeout is set by PAM... Not sure what the default in Ubuntu is - feels closer to 5 minutes than 15, but I could be wrong...

pixellany 02-07-2007 08:34 PM

Just for completeness, I totally disagree with the Ubuntu approach. IMHO, anyone that can learn a few CLI moves can learn to type su, followed by a password--and then not do something stupid.

fukawi2 02-07-2007 08:38 PM

And conversely, anyone can learn to automatically type "sudo" before a stupid CLI command, so that make the 'protection' redundant also :)

aysiu 02-07-2007 09:55 PM

You can read all about the pros and cons here:
https://help.ubuntu.com/community/RootSudo

By the way, to "log in as root," you can just do
Code:

sudo -s
No need to set a separate root password.

jymmi 02-07-2007 10:03 PM

That worked fine,
 
Problem number 1 solved, that work well.

The reason I wanted to do this is to install a untarred program, that is in its own folder, on my desktop, the folder name is Nvu. (program called Nvu)

However when I try to change directory to get into the folder I keep getting a, "Folder or Directory does not exist".

I can get as far as /home/james/ , thats it. When I use Konquer, it is there in plain view.
But I can not get into the folder using Terminal so that I can make the program.

./configure
make
make install

pixellany 02-07-2007 10:45 PM

Quote:

Originally Posted by fukawi2
And conversely, anyone can learn to automatically type "sudo" before a stupid CLI command, so that make the 'protection' redundant also :)

AND---anytime you set out to make something idiot-proof, I will find you 10 idiots who can still break it.

So there...;)

oldmartian 02-26-2007 10:29 AM

Let me get this straight. With super hackers out there anyone can possibly get into my computer to do bad things. But I own the computer and I'm the only one who can't get into my computer.

I've got Kubuntu and I'm just setting up and every turn I make I get a denial unless I go into administrator mode and type in my own password (I'm the owner and sole user, remember) and I get a denial because I don't have a password.

All these excuses in the newsgroups, this web-site and so forth give me excuses...

Why isn't someone from Linux sitting beside me protecting my computer from me? I could do something equally dangerous, like throwing my computer out and buying an Apple?

I JUST WANT A WAY TO GET A ROOT PASSWORD WITHOUT HAVING A ROOT PASSWORD TO DO IT.

Will someone please make me happy that abandoned Windows for Linux? Sorry for the rant, but I want to use my computer, and can't.

Thanks
Oldmartian

fragos 02-26-2007 01:50 PM

The password requested is your personal password. I can see you have been a SuSE 10.1 user and may be accustomed to having to become root to perform administration. Ubuntu and its derivatives take a different approach which eliminates root logins and replaces them with group membership in the "admin" group. As the person that installed you are by default the only member of this group. The purpose of this approach is to limit the amount of time root privileges are active. Use your personal password when requested and you will become accustomed to this approach -- I did.

fukawi2 02-26-2007 03:59 PM

What you are getting frustrated with is a feature specific to Ubunutu (and Ubuntu based) distributions - I dare say there are other also, but I can't think of them off the top of my head...

The whole beauty of Linux - if it doesn't suit you, you are free to choose another distribution that does suit you :)

As fragos said, you'll get used to it... I was originally a RedHat / Fedora user and it frustrated the hell out of me "not" having a root account and having to enter my own password when I wanted to administer my computer. It took less than 2 weeks to get used to "the Ubuntu way" :)

Quakeboy02 02-26-2007 04:30 PM

Or, you could switch to Debian. ;)

oldmartian 02-26-2007 04:31 PM

I'll try to stop whining, but when I see many references to solving problems by opening a terminal and going to the root.

I try it and it wants a password. I enter my personal password and it's invalid. It makes me feel like I'm sneaking into my own house.

So instead I just type sudo -i and at the prompt I enter my personal password.

Well, that's certainly seems more secure than typing su and then entering a root password. :Pengy:

oldmartian 02-26-2007 04:33 PM

Quote:

Originally Posted by Quakeboy02
Or, you could switch to Debian. ;)

I thought debian was a kernel or some other pseudo code name for something non-understandabe to noobs.

Debian is a distro?

Old Martian

Quakeboy02 02-26-2007 05:03 PM

"Debian is a distro?"

Yes, but only for advanced users. LOL

If that really was a serious question, then, yes, Debian is a distro. I believe that Ubuntu and Kubuntu are children, so to speak, of Debian. For some reason, people seem to have problems with it; or at least it's "in" to say that they do. Personally, I like the way Debian does things; but then, I'm a bit "old school".

fukawi2 02-26-2007 05:18 PM

Quote:

Originally Posted by Quakeboy02
Or, you could switch to Debian. ;)

Or Gentoo... Or Slackware... Or Mandrake... Or Fedora... Or DSL... Or, well........ :P

fukawi2 02-26-2007 05:24 PM

Quote:

Originally Posted by oldmartian
So instead I just type sudo -i and at the prompt I enter my personal password.

I'm not sure that really is such a "bad" idea...

One of the benefits of the *Buntu setup is (for example) people who setup an SSH daemon on their system, but don't secure it properly (Protocol 2, (dis)AllowRootLogin, AllowGroups etc), if root is enabled and often with a weak password, someone trying to crack in to the system will get straight in as root, and they will most likely try 'root' as their default username when trying to brute force it (experience from the receiving end here!)

If the root account is disabled, and only accessible via sudo, then the cracker not only has to guess / brute force your password and then sudo to root, they also have to guess your user name too. That exponentially increases the possibilities that they have to try.

They know there's a 'root' account (they don't *know* if it's enabled, or what it's password is, but they know it's there)
They have no idea what your user name is, nor what your password is.

pixellany 02-26-2007 06:06 PM

Quote:

Originally Posted by oldmartian
Let me get this straight. With super hackers out there anyone can possibly get into my computer to do bad things. But I own the computer and I'm the only one who can't get into my computer.

All these excuses in the newsgroups, this web-site and so forth give me excuses...

Will someone please make me happy that abandoned Windows for Linux? Sorry for the rant, but I want to use my computer, and can't.

I can't grasp what you are ranting about. There are things in Windows also that require you to log in as the administrator.

You can configure any Linux distro--including Ubuntu--with any number of options, including:
  1. no passwords required for anything
  2. su for admin privileges (no sudo)
  3. sudo privileges for certain users only
  4. specific functions restricted to privileged users
  5. and more
Tell us exactly how you want it configured....

jymmi 02-26-2007 09:24 PM

If Ubuntu was created from Debian, than is Debian more hardware friendly?

Is Debian better than Ubuntu?

Quakeboy02 02-26-2007 09:29 PM

"Is Debian better than Ubuntu?"

Is red better than blue?

fukawi2 02-26-2007 09:31 PM

Only you can decide if you believe it's better for your purposes...

fragos 02-27-2007 02:25 AM

Both are free, try for yourself. Both are excellent but Ubuntu appears more focused on the desktop. BY focus alone, Ubuntu might be a better choice given the specifics of your question. As an Ubuntu desktop user, I'm quite satisfied with hardware compatibility and ease of use.

oldmartian 02-27-2007 08:29 AM

Debian
 
Quote:

Originally Posted by Quakeboy02
Or, you could switch to Debian. ;)

I thought Kubuntu was debian-based.

fukawi2 02-27-2007 03:59 PM

Quote:

Originally Posted by oldmartian
I thought Kubuntu was debian-based.

Kubuntu is Ubuntu based, and Ubuntu is Debian based :)

pixellany 02-27-2007 04:38 PM

Splitting hairs a bit.
Ubuntu, Kubuntu, Xubuntu, Edubuntu are basically all the same. The main differences are the desktops used.

ALL are based on Debian


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