LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   How do you switch to root user (https://www.linuxquestions.org/questions/ubuntu-63/how-do-you-switch-to-root-user-535417/)

barrythai 03-07-2007 12:00 PM

How do you switch to root user
 
Sorry to ask the classic question.

I have just installed mtink as a user and that was a real pain.

I expect to use root for many applications so how can I switch to root screen in Ubuntu.

Please no replies OH you shouldn't use ROOT.

:Pengy: :Pengy: :Pengy:

osor 03-07-2007 12:06 PM

IIRC, Ubuntu has disabled the root account for interactive logins, and you must use sudo.

AVD_ZM 03-07-2007 12:07 PM

in the shell
u type
su
then it will ask u for the password

ubuntu by default disables root login.
i'm not sure how u can enable it

barrythai 03-07-2007 12:15 PM

Quote:

Originally Posted by AVD_ZM
in the shell
u type
su
then it will ask u for the password

ubuntu by default disables root login.
i'm not sure how u can enable it

Tried that it doesn't work I never gave a root password on installation in any event. Will not accept the user password.

I used a terminal window can I find a shell window?

:Pengy: :Pengy: :Pengy:

barrythai 03-07-2007 12:17 PM

Quote:

Originally Posted by osor
IIRC, Ubuntu has disabled the root account for interactive logins, and you must use sudo.

Sorry not familiar with that command.

What is sudo?

:Pengy: :Pengy: :Pengy:

MOS JEFF-INITELY 03-07-2007 12:25 PM

sudo is a command that allows you to run commands as another user.
ie .. user1 can use sudo to run a command as user2, but it is only temporar for that command (unless you use sudo to call su :))

however you will need to set permissions in the sudo cfg file.. /etc/sudoers

http://www.gratisoft.us/sudo/man/sudo.html

osor 03-07-2007 12:41 PM

Quote:

Originally Posted by AVD_ZM
in the shell
u type
su
then it will ask u for the password

You don’t have to enable it. Just do “sudo bash” (or whatever shell you wish to use). It will probably ask for your password (unless you had already done a sudo recently).

3rdKey 03-07-2007 12:43 PM

you can change log in as root. simply change the password by doing:

Quote:

sudo passwd root
you will then be prompted to enter the new password twice (after you type in your sudo password of course)

barrythai 03-07-2007 01:18 PM

Quote:

Originally Posted by osor
You don’t have to enable it. Just do “sudo bash” (or whatever shell you wish to use). It will probably ask for your password (unless you had already done a sudo recently).

thanks done that now I can get a root shell but how do I log in as root as the ubuntu login screen says administrators must not use this to login.

:Pengy: :Pengy: :Pengy:

barrythai 03-07-2007 01:26 PM

Quote:

Originally Posted by 3rdKey
you can change log in as root. simply change the password by doing:



you will then be prompted to enter the new password twice (after you type in your sudo password of course)

Yes that is OK but I am using Ubuntu and I am trying to login as root to run apache. (Noting you maybe are using Fedora4 that does not have this kind of protection.)

Do you know how to overcome the Ubuntu login screen and login as root. It says the administartor is not allowed to login at this screen. If this is the case what screen can he login on.


:Pengy: :Pengy: :Pengy:

jglen490 03-07-2007 01:55 PM

Quote:

Please no replies OH you shouldn't use ROOT.
O.K., but why?

There are so many ways to execute root level apps that don't leave your system wide open to all the strange little cracker-heads out there. Ubuntu is set up specifically to give a great deal of latitude to run root level apps as a "normal" user.

Try looking up the "sudo -l" command.

binary_y2k2 03-08-2007 12:15 AM

Quote:

Originally Posted by barrythai
thanks done that now I can get a root shell but how do I log in as root as the ubuntu login screen says administrators must not use this to login.

Why do you need to login to a GUI desktop as root?
I can't think of a single reason for doing that, and it's much more dangourous that just running a shell as root (which, by the way is done by "sudo -i")

3rdKey 03-08-2007 12:30 AM

Quote:

Originally Posted by barrythai
Yes that is OK but I am using Ubuntu and I am trying to login as root to run apache. (Noting you maybe are using Fedora4 that does not have this kind of protection.)

Do you know how to overcome the Ubuntu login screen and login as root. It says the administartor is not allowed to login at this screen. If this is the case what screen can he login on.

What I first stated was the commands for Ubuntu. Ubuntu disables logging into the root account by default. In order to do so (either from the terminal or from the Ubuntu sign in screen), you open a terminal window, type in:
Quote:

sudo passwd root
You will then be prompted with "Password:" at which point you enter the password for your account. Once that is done, you then enter the new password for root.

This will allow you to use the "su -" command in the terminal to run as root as well as at the sign on screen login as root.

*Side Note* Runing Fedora Core 5 really doesn't have that much to do with commenting on a Ubuntu post. After all, once you've used Linux for a while, it becomes easy to manuver in other distros:D :D :D

Good luck.

barrythai 03-08-2007 07:21 AM

Quote:

Originally Posted by 3rdKey
What I first stated was the commands for Ubuntu. Ubuntu disables logging into the root account by default. In order to do so (either from the terminal or from the Ubuntu sign in screen), you open a terminal window, type in:

You will then be prompted with "Password:" at which point you enter the password for your account. Once that is done, you then enter the new password for root.

This will allow you to use the "su -" command in the terminal to run as root as well as at the sign on screen login as root.

*Side Note* Runing Fedora Core 5 really doesn't have that much to do with commenting on a Ubuntu post. After all, once you've used Linux for a while, it becomes easy to manuver in other distros:D :D :D

Good luck.

That is the point you can use a terminal as root but you cannot repeat cannot, sign in on the gui screen as root. Having done all you say. you can do all that with, Mandrake, Fedora, redhat, Susi but not to my knowledge in Ubuntu.

the reason I want to run a full LAMP website and without access as root it appears at the moment to be impossible.

This distro is good and far better than Fedora 5 which still will not run 64bit Apache php websites. I am hoping to get Ubuntu to do it but I need to login in a graphics window as root.


:Pengy: :Pengy: :Pengy:

barrythai 03-08-2007 09:12 AM

Found how to do it.

Thanks for all your help.


:Pengy: :Pengy: :Pengy:


All times are GMT -5. The time now is 01:38 AM.