LinuxQuestions.org
Visit Jeremy's Blog.
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 09-09-2003, 11:05 PM   #1
scarecrow
LQ Newbie
 
Registered: Sep 2003
Posts: 7

Rep: Reputation: 0
Unhappy can't log in since no user account exists


I installed mandrake 9.1 and since my keyboard batteries were dead during the install process, i just skipped over the part where you assign user accounts, assuming i could log in as root and create them later (since i decided in the mandrake install screen to not create any password necessary for the root login it should be super simple!).

However, it gives me the "localhost login" prompt but since there's no account its pointless, so i get passed it by entering some garbage and then it kicks me to the mere "login" prompt (i assume this is somehow different from the "localhost login" prompt and may be where i can access the "passwordless" root account)

anyway theres no way to get out of the login prompt circle, all combinations of spaces, nothings, etc dont work to get me into the "passwordless" root account so i cant get a prompt to "su" into anyway...

is there any way to get into the system if no data was entered during install?

-noobie need help! noobie dont want reinstall!

Last edited by scarecrow; 09-09-2003 at 11:10 PM.
 
Old 09-09-2003, 11:23 PM   #2
ranger_nemo
Senior Member
 
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
You should be able to boot into single-user mode...

If it boots up with LILO, when it says "boot:", type in "linux single".

If it boots up with GRUB, select the linux entry, and type "e" to edit. Select the line that starts with "kernel", and type "e", again. At the end of the line, add a space and "single". Hit [enter] to get back to the main GRUB menu, and type "b" to boot.

Once you're in single-mode, you can reset the root password with...

passwd

You can then reboot to get out of single-mode.

Once you can boot into root, you can then add a user account with...

adduser username

I forget whether it asks you to create a password. If not, just use...

passwd username

...to set it. You can then exit out of root and login as username.

<< EDIT >>

Single-user mode is meant to be used only as a maintenance mode. It allows you to do anything as root, but you don't have any network running. The different runlevels are...

0 -- halt -- don't use this or it will just shutdown
1 -- root only / no network
2 -- multi-user / no network / command-line login
3 -- multi-user / network / command-line login
4 -- not used
5 -- multi-user / network / graphic login
6 -- reboot -- don't use this or it will just reboot

These may be different for other distros.

Last edited by ranger_nemo; 04-03-2004 at 09:39 AM.
 
Old 12-09-2003, 11:32 PM   #3
TheTitan
LQ Newbie
 
Registered: Sep 2003
Location: USA
Distribution: openSUSE
Posts: 4

Rep: Reputation: 0
Quote:
Originally posted by ranger_nemo
You should be able to boot into single-user mode...

If it boots up with LILO, when it says "boot:", type in "linux single".

If it boots up with GRUB, select the linux entry, and type "e" to edit. Select the line that starts with "kernel", and type "e", again. At the end of the line, add a space and "single". Hit [enter] to get back to the main GRUB menu, and type "b" to boot.

Once you're in single-mode, you can reset the root password with...

passwd
wow, this worked with the new Red Hat Fedora.

Nice, thanks.

It also automaticly restored the karnel command line after rebooting!
 
Old 02-09-2004, 09:58 AM   #4
vab5
LQ Newbie
 
Registered: Feb 2004
Posts: 2

Rep: Reputation: 0
ROOT PASSWORD FORGOTTEN

hI :

i HAVE FORGOTTEN MY ROOT PASSWORD FOR RED HAT LINUX AND AM DESPERATE TO GET IT BACK..I TRIED ALL THINGS...BUT NO AVAIL..

I WOLD LIKE TO KNOW IF THERE IS AN Y MEANS FOR SETTING A NEW PASSWORD FOR THE ROOT WITHOUT REINSTALLING LINUX--RED HAT

THANKS IN ADVANCE
 
Old 02-09-2004, 10:01 AM   #5
vab5
LQ Newbie
 
Registered: Feb 2004
Posts: 2

Rep: Reputation: 0
HI:

ALSO i DO NOT UNDERSATND WHAT YOU GUYS MEAN BY SINGLE USER MODE AND WHILE BOOTING HOW DO I GET INTO SINGLE USER MODE...

IS IT THERE FOR RED HAT GUI VERSION 9.0

THANKS
 
Old 02-09-2004, 04:14 PM   #6
ranger_nemo
Senior Member
 
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
When the system first boots, it calls up GRUB. This lets you choose what OS to boot, if you are dual booting with Windows, or, lets you choose which kernel to boot, if you have several kernels on your system.

There should be a count down in the bottom half of the screen. When it reaches zero, it times out, and boots the default choice. This is the choice that is highlighted when GRUB first starts. If you hit any key, it will stop the count down.

You can then use the up-down arrows to choose your Linux kernel, if it isn't already hightlighted. Then, press the 'e' key to start editting that entry. Right now, I'm using a stock Fedora kernel. You will get a page with info similar to...
Code:
root (hd0,0)
kernel /vmlinuz-2.4.22-1.2149.nptl ro root=LABEL=/ rhgb
initrd /initrd-2.4.22-1.2149.nptl.img
Arrow down to the line that starts with 'kernel', and hit the 'e' key again. This will allow you to edit the line you have selected. Move all the way to the end of the line, and add " single" to it. Be sure to put a space between whatever is already at the end and the "single". Hit [enter] once or twice to get back to the main GRUB menu, then hit 'b' to boot the entry you just edited.

This will boot the computer into "single user" mode... It's a runlevel that is for performing maintenance on the computer. You are running as root, and the network is down, so you can do any maintenance or backups that you need.

In this case, you will be changing the root password. Just type in the command 'passwd', and follow the directions for entering a new password. Once you are done, reboot the system with the command 'reboot'. Then, boot normally, and you can login as root with the new password.
 
Old 04-11-2004, 09:53 AM   #7
gtkSpeRt
LQ Newbie
 
Registered: Dec 2003
Location: home
Posts: 4

Rep: Reputation: 0
init=sh

HEY!
when lilo boot's up type in:
Code:
linux init=/bin/sh
then type:
passwd
change your password and BAM!
Boyakasha 13yo

btw: you might want to remount the root fs as RW...

Last edited by gtkSpeRt; 04-11-2004 at 09:56 AM.
 
Old 05-05-2004, 05:41 PM   #8
[BFK]BLASSON
LQ Newbie
 
Registered: May 2004
Distribution: Slackware
Posts: 3

Rep: Reputation: 0
when i load up my linux box it goes straight from when i press the power button to login: how i go into single user mode with an option like that? I really need my root password also
 
Old 05-05-2004, 06:18 PM   #9
mbernhardt
LQ Newbie
 
Registered: May 2004
Posts: 2

Rep: Reputation: 0
single user mode in grub

For some reason I can't get into single user mode by adding "single" at the end of the kernel line. It just goes on and boots up into init3. Any ideas?

HELP for another noobie!!
 
Old 05-05-2004, 07:24 PM   #10
chii-chan
Member
 
Registered: Sep 2003
Location: chikyuu (E103N6)
Distribution: Redhat 8.0 (2.4.25-custom), Fedora Core 1 (2.4.30-custom)
Posts: 357

Rep: Reputation: 30
Where did you add the 'single' word? It should be like this:

kernel /vmlinuz-2.4.22-1.2149.nptl ro root=LABEL=/ single rhgb OR

kernel /vmlinuz-2.4.22-1.2149.nptl ro root=LABEL=/ rhgb single

I use fedora and grub....
 
Old 05-05-2004, 07:29 PM   #11
mbernhardt
LQ Newbie
 
Registered: May 2004
Posts: 2

Rep: Reputation: 0
I was just doing
kernel /vmlinuz-2.4.22-1.2149.nptl ro root=LABEL=/ single
This is red hat 7.3, I never heard of adding rhgb.

I was trying to boot into single user because I'd accidentally overwritten /etc/passwd. Is it possible that a hosed /etc/passwd could cause single user not to work?

I fixed it by booting from a floppy and then remounting my root partition RW.
 
Old 08-15-2004, 02:49 PM   #12
abulafiar
LQ Newbie
 
Registered: Aug 2004
Posts: 16

Rep: Reputation: 0
People,
Trying to log into REDHAT and when I enter the user name and password for root keeps telling me "AUTHENTICATION FAILED"
donīt know what to do, canīt login in to REDHAT. Meaning, it recognized the users, but donīt know why but doesnīt seems to like the user....
can anyone help me ??
THANKS A LOT

Rodrigo
 
Old 08-15-2004, 02:57 PM   #13
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by abulafiar
People,
Trying to log into REDHAT and when I enter the user name and password for root keeps telling me "AUTHENTICATION FAILED"
donīt know what to do, canīt login in to REDHAT. Meaning, it recognized the users, but donīt know why but doesnīt seems to like the user....
can anyone help me ??
THANKS A LOT

Rodrigo
Mate, this is a warning.

DO NOT DOUBLE-POST.

You already fired up two threads with your problem,
and now start hi-jacking other peoples threads?


Cheers,
Tink
 
Old 09-11-2004, 02:02 PM   #14
[42]dirt
LQ Newbie
 
Registered: May 2004
Location: arlington, tx
Distribution: fedora 1
Posts: 2

Rep: Reputation: 0
Re: init=sh

Quote:
Originally posted by gtkSpeRt
HEY!
when lilo boot's up type in:
Code:
linux init=/bin/sh
then type:
passwd
change your password and BAM!
Boyakasha 13yo

btw: you might want to remount the root fs as RW...
I tried this, but when I got to actually setting the password, I got the message "Cannot lock the password file; try again later." What's up with that? (pout!!!)

Also, a friend told me that I needed to try "mount /" in single mode, so I did that, and I got the following.

Quote:
mount: /dev/hdc4 already mounted or / busy
mount: according to mtab, /dev/hdc4 is already mounted on /

Last edited by [42]dirt; 09-11-2004 at 02:20 PM.
 
  


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
system account or user account??? yenonn Linux - Newbie 6 05-10-2006 07:49 PM
where does 'su' look to determine if a user exists? MisterESauce Linux - Software 5 04-13-2005 09:18 AM
unable to log in to a user account cheema Mandriva 1 12-25-2004 09:34 AM
ftp cannot log in using new user account wendallsan Linux - Software 0 12-07-2004 08:31 PM
MySQL db exists, can't connect to it, do I need to add user to it? Hero Doug Linux - General 7 01-09-2004 03:54 PM

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

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