LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 03-07-2007, 12:00 PM   #1
barrythai
Member
 
Registered: Dec 2004
Location: thailand
Distribution: suse9.3, Mandrake10.1
Posts: 381

Rep: Reputation: 30
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.

 
Old 03-07-2007, 12:06 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
IIRC, Ubuntu has disabled the root account for interactive logins, and you must use sudo.
 
Old 03-07-2007, 12:07 PM   #3
AVD_ZM
Member
 
Registered: Oct 2004
Location: HELLAS aka Greece
Distribution: K/Ubuntu Knoppel
Posts: 114

Rep: Reputation: 15
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
 
Old 03-07-2007, 12:15 PM   #4
barrythai
Member
 
Registered: Dec 2004
Location: thailand
Distribution: suse9.3, Mandrake10.1
Posts: 381

Original Poster
Rep: Reputation: 30
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?

 
Old 03-07-2007, 12:17 PM   #5
barrythai
Member
 
Registered: Dec 2004
Location: thailand
Distribution: suse9.3, Mandrake10.1
Posts: 381

Original Poster
Rep: Reputation: 30
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?

 
Old 03-07-2007, 12:25 PM   #6
MOS JEFF-INITELY
Member
 
Registered: Sep 2006
Distribution: Windows .. MUAHAHAHA
Posts: 66

Rep: Reputation: 15
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
 
Old 03-07-2007, 12:41 PM   #7
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
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).
 
Old 03-07-2007, 12:43 PM   #8
3rdKey
Member
 
Registered: Feb 2007
Location: United States
Distribution: Fedora , Knoppix
Posts: 60

Rep: Reputation: 15
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)
 
Old 03-07-2007, 01:18 PM   #9
barrythai
Member
 
Registered: Dec 2004
Location: thailand
Distribution: suse9.3, Mandrake10.1
Posts: 381

Original Poster
Rep: Reputation: 30
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.

 
Old 03-07-2007, 01:26 PM   #10
barrythai
Member
 
Registered: Dec 2004
Location: thailand
Distribution: suse9.3, Mandrake10.1
Posts: 381

Original Poster
Rep: Reputation: 30
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.


 
Old 03-07-2007, 01:55 PM   #11
jglen490
Member
 
Registered: Apr 2002
Location: The next brick house on the right.
Distribution: Kubuntu 18.04, Bodhi 5.0
Posts: 691

Rep: Reputation: 45
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.
 
Old 03-08-2007, 12:15 AM   #12
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
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")
 
Old 03-08-2007, 12:30 AM   #13
3rdKey
Member
 
Registered: Feb 2007
Location: United States
Distribution: Fedora , Knoppix
Posts: 60

Rep: Reputation: 15
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

Good luck.
 
Old 03-08-2007, 07:21 AM   #14
barrythai
Member
 
Registered: Dec 2004
Location: thailand
Distribution: suse9.3, Mandrake10.1
Posts: 381

Original Poster
Rep: Reputation: 30
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

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.


 
Old 03-08-2007, 09:12 AM   #15
barrythai
Member
 
Registered: Dec 2004
Location: thailand
Distribution: suse9.3, Mandrake10.1
Posts: 381

Original Poster
Rep: Reputation: 30
Found how to do it.

Thanks for all your help.


 
0 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I switch ROOT/ADMINISTRATOR to another user?? Balarabay1 Linux - Software 4 07-21-2006 03:54 AM
switch to user installed window manager without root jaddison Linux - Software 13 04-13-2006 07:23 PM
How switch root to another user? Xiangbuilder Linux - Newbie 1 09-15-2003 07:19 AM
Log on as Root, or switch to Root, in MDK 9.1 - KDE 3.1.0 snorky Mandriva 3 09-01-2003 12:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 05:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration