LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-11-2009, 09:53 AM   #1
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 373
Blog Entries: 2

Rep: Reputation: 32
Question I can't login as root...


OK when i start up my computer, gdm shows and asks me for my username and password. I give it my username and password and it works but when i give it root and root's password it says incorrect username or password..

But i can do sudo su and then i give it root's password and it works

I can't do su - or su root

Could someone explain me what is going on here?

Quote:
creep@creepy-desktop:~$ su -
Password:
su: Authentication failure
creep@creepy-desktop:~$ su root
Password:
su: Authentication failure
creep@creepy-desktop:~$ sudo su
root@creepy-desktop:/home/creep#

Kubuntu 8.10 KDE 4.2.1
 
Old 03-11-2009, 10:18 AM   #2
akuthia
Member
 
Registered: Oct 2007
Location: triad, nc, usa
Distribution: Ubuntu
Posts: 232

Rep: Reputation: 29
((dont quote me on this)) I dont THINK "root" is an actualy\ user, per se, but rather, more like a permissions level or group. The whole gorup then uses the password for anything that needs root level access...
 
Old 03-11-2009, 10:30 AM   #3
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 373

Original Poster
Blog Entries: 2

Rep: Reputation: 32
If there is an entry in /etc/passwd then that user is said to exist. Root even has it's own home direcotry.. that MUST be a real user i just can't figure out why won't it let me login.. I remember installing slackware and it said i can now login as root and it worked so it's definitely a user..

any ideas..?
 
Old 03-11-2009, 10:46 AM   #4
Maligree
Member
 
Registered: Mar 2008
Distribution: Gentoo, CentOS, Fedora, Arch
Posts: 231
Blog Entries: 1

Rep: Reputation: 42
Whatever distro you're using (looks like something Ubuntuish) obviously the root account is "disabled". If you want to activate it, run..
Code:
sudo passwd
and set a password for root.

By the way, graphical login for root is disabled by default.
 
Old 03-11-2009, 11:06 AM   #5
kasunbg
LQ Newbie
 
Registered: Mar 2009
Location: Sri Lanka
Distribution: Ubuntu 9.10
Posts: 13

Rep: Reputation: 0
Lightbulb

Of course root is also a user with all the privileges. As Maligree mentioned graphical log-in for root is disabled by default. It is done for your own safety. Because with root privileges you can edit any system file and even delete them. This is really dangerous and therefore root should not be used as your regular user account.

The thing with sudo and su is bit different.
When you use sudo command(ex.
Code:
sudo kate
Kasun@kasun~cse:~$ sudo kate
[sudo] password for Kasun:
) it asks for the current user's password.
But when you use su it asks for root password.
Code:
Kasun@kasun~cse:~$ su
Password:
root@kasun~cse:/home/Kasun#
If you have several users with admin rights, the root password will be the last added user's password.
But you can manually change the root password.(for kubuntu goto Applications->System->Kuser)and click on root account and set a new Password.

hth
 
Old 03-11-2009, 11:11 AM   #6
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 373

Original Poster
Blog Entries: 2

Rep: Reputation: 32
One question. I was looking at the /etc/shadow file and i see that the password for root is '!'.. what does it mean? Doesn't '*' mean no password?

Quote:
root:!:14307:0:99999:7:::
So how can i enable graphical root login?
 
Old 03-11-2009, 11:11 AM   #7
SkinnerC
Member
 
Registered: Dec 2007
Location: New England, USA
Distribution: Ubuntu 8.04 LTS, Slackware 12.2
Posts: 138
Blog Entries: 1

Rep: Reputation: 20
In the *buntu family, root is not allowed to log in graphically.

Also, to change to root you will have to type in
Code:
sudo su
. Then enter root's password.
 
Old 03-11-2009, 11:29 AM   #8
Lee_Ball
Member
 
Registered: Jul 2005
Location: Manchester (UK)
Distribution: Fedora CentOS
Posts: 132

Rep: Reputation: 18
SkinnerC is half right, when using sudo the password you should be entering is your password.
 
Old 03-11-2009, 11:30 AM   #9
Lee_Ball
Member
 
Registered: Jul 2005
Location: Manchester (UK)
Distribution: Fedora CentOS
Posts: 132

Rep: Reputation: 18
Quote:
Originally Posted by QueenZ View Post
One question. I was looking at the /etc/shadow file and i see that the password for root is '!'.. what does it mean? Doesn't '*' mean no password?

So how can i enable graphical root login?

If you're using Ubuntu you could always:

sudo su
Enter your password

This should give you a # root terminal

Then do:

passwd
enter a password you want for root

Log out and login with root and the password you just set.
 
Old 03-11-2009, 12:29 PM   #10
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 373

Original Poster
Blog Entries: 2

Rep: Reputation: 32
Looks like all i had to do to enable root login was to set the password for root so i used KUser to do that and i can now login as root! YAY!
 
Old 03-11-2009, 01:20 PM   #11
SlowCoder
Senior Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250

Rep: Reputation: 164Reputation: 164
Quote:
Originally Posted by QueenZ View Post
Looks like all i had to do to enable root login was to set the password for root so i used KUser to do that and i can now login as root! YAY!
But for what reason do you feel you must be logged in directly as root? General practice is to log in under your own account, then use the console to sudo into root. This way you have much less likelyhood of running something that could damage your system as a normal user.
 
Old 03-11-2009, 01:23 PM   #12
ronlau9
Senior Member
 
Registered: Dec 2007
Location: In front of my LINUX OR MAC BOX
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369

Rep: Reputation: Disabled
Quote:
Originally Posted by QueenZ View Post
Looks like all i had to do to enable root login was to set the password for root so i used KUser to do that and i can now login as root! YAY!
What is so exciting in login as root ?
 
Old 03-11-2009, 01:32 PM   #13
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
i can now login as root! YAY
You are logging into the GUI as root?

You are misguided. A quick search will explain why.

Good luck.

Last edited by tredegar; 03-11-2009 at 01:34 PM. Reason: Politeness
 
Old 03-11-2009, 01:35 PM   #14
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 373

Original Poster
Blog Entries: 2

Rep: Reputation: 32
haha actually i just wanted to know why i wasn't able to log in as root. I'm new to linux and i want to know everything haven't you been there ? I don't actually need to log in as root but now i see why i wasn't able to

Cheers!
 
Old 03-11-2009, 01:38 PM   #15
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 373

Original Poster
Blog Entries: 2

Rep: Reputation: 32
A quick search got me nowhere..

Don't login as root - Google search
 
  


Reply



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
Adding root privaliges to user accounts or auto login as root Val-Ent Linux - General 15 03-02-2010 04:27 PM
wrong login shell prevent root login cefs99 Linux - Security 4 05-31-2006 08:28 AM
Gnome: Cannot login as default user, sends back to login, works as root Danny-T Linux - Newbie 2 05-27-2006 03:44 AM
I have re-installed MK 9.2 but cannot login as user, login as root works. bobinglis Mandriva 2 02-22-2004 11:39 AM
can only login as root? user login doesnt work..? anyone? hacking_4_b33r Linux - General 1 02-05-2004 11:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:29 PM.

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