PDA

View Full Version : How do i log in as root user?



spacedude89
01-29-2005, 11:16 AM
how do i log in as root in the login screen, is says root login not allowed, i need to make a folder under /usr/ to be writable......

Harry Kuhman
01-29-2005, 11:22 AM
Gee, you wouldn't want to read any of the other posts where this question is already answered, just post and expect people to write the information for you. I doubt if you could have come up with another question where the answer was as easy to find.

spacedude89
01-29-2005, 11:37 AM
i know, ive been looking at all of those other threads, but none of them work for me, and none tell how to login as root and the main login page....

OErjan
01-30-2005, 05:30 PM
you do NOT need to login as root for that. just type
sudo comand
for your specific problem perhaps

sudo konqueror you now have konqueror as root, when you shot it down you are not root anymore.

Cuddles
01-30-2005, 06:19 PM
spacedude89,

Your question is "kinda" what everyone is getting un-nerved about, it deals with getting "root access", thus, it is like "root password" subjects...

First, are you running off the Live CD, or have you hard drive installed?

Depending on your above answer, here is your answers:

Live CD
You realizes that root doesnt have a password, and thus, making any changes to the OS will not be maintained during a reboot - i.e. your directory / folder you create, wont exist after you reboot, right ?

If you are running the Live CD, there is no root password, to get root, you use the su or the sudo commands in a users Konsole screen. To get what you want to do with the Live CD, you would do the following:

( 1 ) Start a regular user Konsole, text, and is "like" a DOS screen in Windows.
( 2 ) Type one of the following:

su
mkdir somedirectory

or

sudo mkdir somedirectory

replacing "somedirectory" with the path / and folder you want to create, like this... if you wanted to create a folder under /usr named scrappy - then the two above examples would look like this:

su
mkdir /usr/scrappy
exit

or

sudo mkdir /usr/scrappy

Now, if you hard drive installed, things change a little bit, considering that "during a hard drive install", you create a root user account, and create its own password ( it is part of the install )

Hard Drive Installed
To get what you want, you dont have to log out, and re-login as a root, you can do the same thing mentioned in the Live CD above, as you can if you did a hard drive install, the only differance is, that, you DO have a root password in a hard drive install, and thus, may be required to enter that password in doing some commands.

One of the big things that newbies to this whole "root / user" thing in Linux, and in Knoppix, is, that people think they have to BE root all the time, or have to LOGIN specifically as root, to do things... As you learn about Linux, you begin to realize its not so much BEING root all the time, but, rather, being ABLE to be root when you NEED IT ( which is not ALWAYS, and being root ALWAYS is a security risk ) -=- So, you get root when you NEED IT, and drop being root, when you DONT need it...

So, if you have a hard drive install, and want to create a folder, follow the same examples as I displayed in the Live CD area above, except, this MAY BE what you will see doing them:

su
please enter password: (enter root password)
mkdir /usr/scrappy
exit

or

sudo mkdir /usr/scrappy
please enter password: (enter root password)

Again, its not the fact that you have to login as root specifically, you dont have to, you can get root, anytime you want it, or need it, as long as you have the root password, or are "permitted" to becoming root - the "knoppix" user ( on the Live CD boot ) is permitted to becoming root, because it is in the sudo users file, if you hard drive install Knoppix, you can add other users to this file, and allow them to be root, if they want to, but, as the file will tell you, you dont want EVERYONE to have this ability, it can turn into a serious security risk...

Hopefully, this helps,
Ms. Cuddles

sakiZ
02-05-2005, 05:27 PM
<<One of the big things that newbies to this whole "root / user" thing in Linux, and in Knoppix, is, that people think they have to BE root all the time, or have to LOGIN specifically as root, to do things... As you learn about Linux, you begin to realize its not so much BEING root all the time, but, rather, being ABLE to be root when you NEED IT ( which is not ALWAYS, and being root ALWAYS is a security risk ) -=- So, you get root when you NEED IT, and drop being root, when you DONT need it... >>

Good points. My first couple of HD installs I just HAD to have a root log in mode. Then, after a lot of playing and tinkering it dawned on me I didn't. It was getting too confusing. I had my email set up in root, but when I wanted to do wine programs, I had to be in user mode. Two log ins was WAY more trouble than it was worth.

I now only log in as user. But.... I do like to get into root a lot, so here is what I did. I dragged a link from the Super User mode file manager to my task bar. Now it is right there for easy access. When it asks me for a password I also click the "keep password" box so I only have to give the root password once per session.

If I need the console, I just press F4 within Super User File Manager. No additional password typing needed this way.

Best of both worlds.

sakiZ

alex52
02-11-2005, 09:51 AM
If you want to be full root, just visit this post for detailed instruction how to be full root and much more:

http://www.knoppix.net/forum/viewtopic.php?t=17024