LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-02-2007, 06:31 PM   #1
hallows1
Member
 
Registered: Mar 2006
Distribution: Debian 3.1, Ubuntu 6.06 Dapper Drake
Posts: 56

Rep: Reputation: 15
Allow Root to log in in ubuntu


I am needing to log in as root to do some stuff, can anyone please assist me in how i would go about enabling root to log in via the graphical interface please
 
Old 04-02-2007, 06:51 PM   #2
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
If you're using gnome this may help.

http://ubuntuguide.org/wiki/Ubuntu_E...gin_into_GNOME

Good luck.
 
Old 04-02-2007, 11:29 PM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
By default the root account has a password that is difficult to guess. Instead of using root, you can sudo your commands (it will prompt you for YOUR password).

To set the password for root, type the below in a terminal
Code:
sudo passwd root
and specify the root password.
 
Old 04-03-2007, 08:15 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
By default the root account has a password that is difficult to guess
By default, Ubuntu has NO root password---ie the account is disabled.

Note: You may also want to enable the GUI root login. (Although most will tell you this is really bad idea). This is done in the config menus--I think it called login manager....
 
Old 04-03-2007, 04:09 PM   #5
Walman
Member
 
Registered: Jun 2004
Location: Venezuela
Distribution: RHEL ,Ubuntu, Slax, Kali
Posts: 95

Rep: Reputation: 15
You could login as root

issue the command "sudo passwd root"
Type your passwd if you are root , it might ask this twice

The when you su - root always use the passwwd above
 
Old 04-03-2007, 06:25 PM   #6
Zention
Member
 
Registered: Mar 2007
Posts: 119

Rep: Reputation: 16
I would be quite interested to know how they disabled the root account.

I suspect it just is random password set.

ps -ef | grep root would show quickly if the account has been disabled or not.
 
Old 04-03-2007, 11:25 PM   #7
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
That is what I thought, but pixellany corrected me. The answer might be in the passwd man page.
Quote:
User accounts may be locked and unlocked with the -l and -u flags. The -l option disables an account by chang*ing the password to a value which matches no possible encrypted value. The -u option re-enables an account by changing the password back to its previous value.
Wonder how they achieve the latter unless a copy is stored somewhere.

Last edited by Wim Sturkenboom; 04-05-2007 at 12:35 AM. Reason: fixed a closing tag
 
Old 04-04-2007, 01:56 AM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by Wim Sturkenboom
That is what I thought, but pixellany corrected me. The answer might be in the [i]passwd[i/] man page.
Wonder how they achieve the latter unless a copy is stored somewhere.
But pixellany might well be wrong....

After my other post, I realized that I did not have absolute detailed knowledge of what happens.

How DO you disable an account? Can you tell from /etc/passwd if it is disabled?
 
Old 04-04-2007, 03:51 AM   #9
runnerfrog
Member
 
Registered: Jul 2006
Location: Paraná, Argentina
Distribution: Frugalware 0.6 (Terminus) - Kubuntu 7.04 (Feisty Fawn Herd 5)
Posts: 217

Rep: Reputation: 31
Quote:
Originally posted by pixellany:
How DO you disable an account? Can you tell from /etc/passwd if it is disabled?
Yes, you can if the root line in /etc/passwd looks like this:

root:x:0:0:root:/root:/sbin/nologin

Then the account is disabled, but sudo and other apps that do not require access to the shell can still access the root account.

It is reenabled when you change /sbin/nologin to /bin/bash or another shell, but the great thing to me still is which is the password... ubuntu, may be? I've seen many Ubuntu's that doesn't ask you for root password, so, it is disabled AND passwordless, may be?

EDIT: An empty /etc/securetty file prevents root login from any device too.

Last edited by runnerfrog; 04-04-2007 at 04:00 AM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS Root setup - can't log in as root after CHMOD ? gallwapa Linux - General 1 04-02-2007 04:31 AM
ubuntu, I can no longer become root or have root rights TroelsSmit Linux - Newbie 7 03-24-2007 07:17 PM
Cant only log in as root after user log-in. ADJenkins Linux - General 2 11-17-2004 04:18 PM
Log Out root Then Log In As Other User xtremcoder Linux - General 4 10-04-2004 11:01 PM
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 - General

All times are GMT -5. The time now is 10:23 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