LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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-16-2009, 09:32 AM   #1
emibee
LQ Newbie
 
Registered: Mar 2009
Posts: 14

Rep: Reputation: 0
Need to log in as root - how?


To fix a login problem (details in another thread), it's been suggested I log in as root user. How can I do that? I type in "root" as the login and then need to put in a password. What password is that? I never set up a password for root as far as I know.
 
Old 03-16-2009, 09:46 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by emibee View Post
To fix a login problem (details in another thread), it's been suggested I log in as root user. How can I do that? I type in "root" as the login and then need to put in a password. What password is that? I never set up a password for root as far as I know.
Are you using ubuntu by any chance?
If your are then this link
http://www.debianadmin.com/enable-an...-password.html
explains what to do.
If you're not using ubuntu are you going to say what distro you are using or do I keep guessing?
cheers,
jdk
 
Old 03-16-2009, 10:07 AM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
it's been suggested I log in as root user
Seems to me they mean to login as root in a terminal, not in X

So open a terminal and type
Code:
su
or
Code:
sudo command
 
Old 03-16-2009, 10:57 AM   #4
lukav
Member
 
Registered: Sep 2008
Distribution: Slackware & Ubuntu
Posts: 39

Rep: Reputation: 15
One way to setup a password for root is to switch to single user mode. This can be done by adding the word "single" to the end of your boot parameter. Once in single user mode, type "passwd" and hit enter.

If you use grub, hit the escape button on your keyboard during boot up to pull up the grub menu. At the grub menu hit the "a" key on your keyboard, this should pull up the boot parameter. Add the word "single" (without quotes) to the end and hit enter.

If you use lilo, type "single" at the boot prompt and hit enter.
 
Old 03-16-2009, 10:59 AM   #5
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,661

Rep: Reputation: 485Reputation: 485Reputation: 485Reputation: 485Reputation: 485
========
To fix a login problem (details in another thread), it's been suggested I log in as root user. How can I do that? I type in "root" as the login and then need to put in a password. What password is that? I never set up a password for root as far as I know.
========

emibee:

Next time please include in your post what is your distro, as some distributions have other "root" policy implementations intended (not to confuse but) for users of different needs and preferences.

Now, if seems you are running Ubuntu or Mint, or other debian derivative that suppresses root account at installation.

Usually, when it is said "login as root" you only launch a terminal and type:

$ sudo -i <Enter>
Password: <here you enter your normal user's password: the one you used when you logged in>

Then if correctly authenticated you will notice that the prompt color turns to red and your user name is already root:
e.g. it looks like this-

#root@hostname: #

Please give time to read very useful material in your /usr folder:

/usr/doc/linux-HOWTOs

You'll get faster anwers by reading it and make your Linux experience fantastic.

Hope this helps.
 
Old 03-16-2009, 01:42 PM   #6
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Quote:
Originally Posted by lukav View Post
One way to setup a password for root is to switch to single user mode. This can be done by adding the word "single" to the end of your boot parameter. Once in single user mode, type "passwd" and hit enter.

If you use grub, hit the escape button on your keyboard during boot up to pull up the grub menu. At the grub menu hit the "a" key on your keyboard, this should pull up the boot parameter. Add the word "single" (without quotes) to the end and hit enter.

If you use lilo, type "single" at the boot prompt and hit enter.
This would have worked earlier, but nowadays it's taken into account and at least Ubuntu, if I remember correctly, prevents this by asking for root password anyway. So I guess this won't work here; using su or sudo works better here, or if they're blocked for some reason (no root password and misconfigured sudoers file, ...), livecd might help out pretty quickly.

If one uses 'su' to become root, care should be taken with the environment, which in some cases might make difference.
Code:
su
causes the environment to remain without change,
Code:
su -
causes the environment to become that of root (as if root had logged in). The latter might be the one to use, unless there's special need, in which case one should know what to do.
 
Old 03-16-2009, 04:55 PM   #7
emibee
LQ Newbie
 
Registered: Mar 2009
Posts: 14

Original Poster
Rep: Reputation: 0
I'm using a Dell mini 9 with ubuntu. Sorry for not giving enough details earlier.

What is a terminal? I don't know how to start a terminal. I don't really know what GRUB is either, but I've tried to pull up GRUB during boot up with the <esc> key, but nothing happens. it just makes the ubuntu noise (i think?).
 
Old 03-16-2009, 06:13 PM   #8
coffeecoffee
Member
 
Registered: Feb 2009
Posts: 58

Rep: Reputation: 16
Quote:
Originally Posted by emibee View Post
I'm using a Dell mini 9 with ubuntu. Sorry for not giving enough details earlier.

What is a terminal? I don't know how to start a terminal. I don't really know what GRUB is either, but I've tried to pull up GRUB during boot up with the <esc> key, but nothing happens. it just makes the ubuntu noise (i think?).
A terminal is a program where you can type commands in to it. It is also called a console.

Grub is a boot loader for linux, it helps your computer start linux when it boots.
 
Old 03-17-2009, 12:17 AM   #9
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by emibee View Post
I'm using a Dell mini 9 with ubuntu. Sorry for not giving enough details earlier.

What is a terminal? I don't know how to start a terminal. I don't really know what GRUB is either, but I've tried to pull up GRUB during boot up with the <esc> key, but nothing happens. it just makes the ubuntu noise (i think?).
I suggest you have a look at the link I sent you in my 1st posting.
cheers,
jdk
 
Old 03-17-2009, 01:16 PM   #10
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 4,512

Rep: Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407
Quote:
Originally Posted by emibee View Post
I'm using a Dell mini 9 with ubuntu. Sorry for not giving enough details earlier.

What is a terminal? I don't know how to start a terminal. I don't really know what GRUB is either, but I've tried to pull up GRUB during boot up with the <esc> key, but nothing happens. it just makes the ubuntu noise (i think?).
Look in your menu, and somewhere you'll find the option Terminal. Click on that and a window opens with a prompt for a command. Then you can follow the instructions given by malekmustaq.

It's really worth learning how to use the terminal. A lot of things can be done with it much more easily than with the GUI, and some things must be done that way.
 
Old 03-17-2009, 03:02 PM   #11
emibee
LQ Newbie
 
Registered: Mar 2009
Posts: 14

Original Poster
Rep: Reputation: 0
I can't log into any[ of my users right now, and that is why I need to log in to root, so I can change the name of my home directory. How can I access GRUB or another boot loader from the login screen? Pressing <Esc> does nothing except make a noise.

I don't know which bootloader my system uses, but I have whatever came on my machine when it arrived, with ubuntu, a few weeks ago.

Could someone give stepbystep directions for how to do all this? I've found some here: http://www.linuxquestions.org/questi...e-help-527279/ , and it seems to have worked, but it won't work for me from step 1 because I can't get GRUB to come up! When I boot up the computer, it goes from black screen to the ubuntu logo loading straight to the login screen. Where is GRUB?

Thanks for the help!
 
Old 03-17-2009, 07:55 PM   #12
lukav
Member
 
Registered: Sep 2008
Distribution: Slackware & Ubuntu
Posts: 39

Rep: Reputation: 15
1. Get a linux liveCD... like here.
2a.Get an external CD drive as I don't believe the mini 9 has one built in
2. Boot from liveCD (choose "try"... NOT install)
3. Mount hard drive (In Ubuntu liveCD click on "Places" and then the drive that indicates your hard drive)
4. Use CLI (In Ubuntu liveCD click on "Applications" -> "Accesories" -> "Terminal") and chroot to hard drive

assuming that your hard drive was mounted to /media/disk at the CLI type:
Code:
sudo chroot /media/disk
5. change root password by typing "passwd" in CLI
6. Reboot and try using new password..

Last edited by lukav; 03-17-2009 at 08:15 PM. Reason: added 2a
 
Old 03-18-2009, 12:44 AM   #13
hariarr
LQ Newbie
 
Registered: Mar 2009
Posts: 10

Rep: Reputation: 0
Thumbs up

Quote:
Originally Posted by emibee View Post
To fix a login problem (details in another thread), it's been suggested I log in as root user. How can I do that? I type in "root" as the login and then need to put in a password. What password is that? I never set up a password for root as far as I know.
Open terminal

type:-

1> sudo passwd root

type your current passwd ******

Type new passwd for root ******
confirm it ******

DONE!!!


Rock On!!
LiNuX RuLeZ
 
Old 03-18-2009, 10:02 PM   #14
chepe263
LQ Newbie
 
Registered: Mar 2009
Posts: 4

Rep: Reputation: 0
Quote:
Originally Posted by repo View Post
Seems to me they mean to login as root in a terminal, not in X

So open a terminal and type
Code:
su
or
Code:
sudo command
This is exactly what i did. maybe you need to navigate to the folder where is the information that needs root permitions. use cd (folder name)

if you want to change a file maybe could be useful write sudo nautilus to open nautilus whit full access but becareful, files are important for correct funtion of your os

chepe263
 
  


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
NFS Root setup - can't log in as root after CHMOD ? gallwapa Linux - General 1 04-02-2007 04:31 AM
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 in as root??? jabberwock486 Mandriva 3 06-07-2004 04:34 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 - Newbie

All times are GMT -5. The time now is 10:00 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration