LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 02-22-2006, 05:59 PM   #1
Red Knuckles
Member
 
Registered: Jan 2006
Location: Colorado USA
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235

Rep: Reputation: 30
Red face root pw not recognized


I changed something in Yast2>Security, probably >Local where I set file system access to paranoid. Now when I try to become root in terminal I get:

yyyyyy@tttttt:~> su
Password:
Permissions on the password database may be too restrictive.
su: incorrect password


The password isn't/can't be incorrect as I haven't changed it and it has been in use since I installed Suse last week. Can anyone help me solve this problem???
 
Old 02-22-2006, 06:24 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Boot into rescue or recovery mode with the install CD. Then edit these files: http://www.linuxcompatible.org/thread28427-1.html
 
Old 02-22-2006, 08:06 PM   #3
Red Knuckles
Member
 
Registered: Jan 2006
Location: Colorado USA
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235

Original Poster
Rep: Reputation: 30
Question

Quote:
Originally Posted by pljvaldez
Boot into rescue or recovery mode with the install CD. Then edit these files: http://www.linuxcompatible.org/thread28427-1.html
When I run install CD and boot into rescue mode the first thing it wants is for me to login. Then it asks for password and I enter it and it gives the error:

Incorrect password

What do I do next? Or what do I do to get around this???
 
Old 02-22-2006, 08:09 PM   #4
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Try "single" at the boot prompt.

Or try booting a live CD, then mounting your install partition, then chroot /dev/hdaX where /dev/hdaX is of course your proper partition you just mounted. chroot will give you root priveledges to edit files in your old partition...
 
Old 02-22-2006, 08:33 PM   #5
Red Knuckles
Member
 
Registered: Jan 2006
Location: Colorado USA
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235

Original Poster
Rep: Reputation: 30
Red face

Quote:
Originally Posted by pljvaldez
Try "single" at the boot prompt.

Or try booting a live CD, then mounting your install partition, then chroot /dev/hdaX where /dev/hdaX is of course your proper partition you just mounted. chroot will give you root priveledges to edit files in your old partition...
When I run install CD and go to 'rescue mode' and type in 'single' it asks for PW. By live CD do you mean System Rescue CD or Knoppix? Also how do I mount my partition, which is /dev/hda2.
 
Old 02-22-2006, 08:38 PM   #6
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Should be something like mount -t ext3 /dev/hda2 /mnt/hda2. man mount
 
Old 02-22-2006, 09:14 PM   #7
Red Knuckles
Member
 
Registered: Jan 2006
Location: Colorado USA
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by pljvaldez
Should be something like mount -t ext3 /dev/hda2 /mnt/hda2. man mount
Actually I got something to happen with 'System Rescue CD' by running:

mkdir /mnt/mkdir
mount -t reiserfs /dev/hda2 /mnt/mkdir

and edited the files as described in the link. Didn't work. Still don't have root access. Will try again with:

mount -t reiserfs /dev/hda2 /mnt/hda2/ man mount

or

mount -t reiserfs /dev/hda2 /mnt/hda2
 
Old 02-22-2006, 09:42 PM   #8
Red Knuckles
Member
 
Registered: Jan 2006
Location: Colorado USA
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Red Knuckles
Actually I got something to happen with 'System Rescue CD' by running:

mkdir /mnt/mkdir
mount -t reiserfs /dev/hda2 /mnt/mkdir

and edited the files as described in the link. Didn't work. Still don't have root access. Will try again with:

mount -t reiserfs /dev/hda2 /mnt/hda2/ man mount

or

mount -t reiserfs /dev/hda2 /mnt/hda2
Ok, the 'System Rescue CD' says to not mount anything directly to '/mnt' as it will freeze the system but to run 'mkdir /mnt/mydir' and mount to '/mnt/mydir'. So here's what I've done:

mkdir /mnt/mydir
mount -t reiserfs /dev/hda2 /mnt/mydir

I then used 'nano' to edit '/etc/passwd' and '/etc/shadow' as described in the link. Did not work. I still don't have root access. Anymore ideas???
 
Old 02-22-2006, 09:49 PM   #9
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
After you mount it, you have to chroot /mnt/mydir then try editing with nano...
 
Old 02-22-2006, 10:50 PM   #10
Red Knuckles
Member
 
Registered: Jan 2006
Location: Colorado USA
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by pljvaldez
After you mount it, you have to chroot /mnt/mydir then try editing with nano...
Ok, when I run 'chroot /mnt/mydir' It goes from root to:

\h:\w\$

and when I type 'nano /etc/passwd' it says 'command nano not found'. Same for 'run_qtinyeditor'. When I use vim it opens the file but I can't tell what to do or how to save file after editing or how to close it. Need more help!

Last edited by Red Knuckles; 02-23-2006 at 02:40 PM.
 
Old 02-22-2006, 10:56 PM   #11
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Google for vim tutorial (haven't used it in a long time). Essentially you'll push something like "i" to go into insert mode, then delete the sections you need to delete, then hit something like "q" and "s"... Don't really remember. Read a tutorial before you have to do it. Otherwise you might delete a whole line or something...
 
Old 02-22-2006, 11:57 PM   #12
Red Knuckles
Member
 
Registered: Jan 2006
Location: Colorado USA
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by pljvaldez
Google for vim tutorial (haven't used it in a long time). Essentially you'll push something like "i" to go into insert mode, then delete the sections you need to delete, then hit something like "q" and "s"... Don't really remember. Read a tutorial before you have to do it. Otherwise you might delete a whole line or something...
I need to go to bed. Will work on this more tomorrow. At this point in terminal I get:

zzzzz@xxxxxx:~> su
su: incorrect password

So It won't even let me type my password. If I use any gui that requires root I get the error:

Error-KDE su
su returned with an error

So we'll see what I can learn tomorrow.
 
Old 02-23-2006, 11:27 AM   #13
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Here's a vim cheat sheet: http://www.tuxfiles.org/linuxhelp/vimcheat.html. chroot'ing seems like it was the proper thing to do since you could get to the file. Now you just need to use this cheat sheet to edit the file and restore root to a "zero password" state.

So after you chroot, cp /etc/passwd /etc/passwd.bak, then vi /etc/passwd, then hit i to insert the cursor, use the arrow keys to go where you need to edit, delete the password as that link said to do, then hit :wq which will write the file and quit. Then do the same for /etc/shadow (be sure to make a backup copy also).

Reboot and login as root without a password. Then immediately passwd to set your new password.

Last edited by pljvaldez; 02-23-2006 at 11:30 AM.
 
Old 02-23-2006, 11:31 AM   #14
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
On a side note, it's good to learn at least this much about vim because virtually every *nix system comes installed with vi (which actually is vim because vi has evolved -- but I digress). So in a pinch you'll at least know how to edit a file in vi. You won't be blazing fast like the gurus who master vi, but you'll be able to get your system booted again...
 
Old 02-23-2006, 02:28 PM   #15
Red Knuckles
Member
 
Registered: Jan 2006
Location: Colorado USA
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by pljvaldez
Here's a vim cheat sheet: http://www.tuxfiles.org/linuxhelp/vimcheat.html. chroot'ing seems like it was the proper thing to do since you could get to the file. Now you just need to use this cheat sheet to edit the file and restore root to a "zero password" state.

So after you chroot, cp /etc/passwd /etc/passwd.bak, then vi /etc/passwd, then hit i to insert the cursor, use the arrow keys to go where you need to edit, delete the password as that link said to do, then hit :wq which will write the file and quit. Then do the same for /etc/shadow (be sure to make a backup copy also).

Reboot and login as root without a password. Then immediately passwd to set your new password.
Ok, the files are edited. but I haven't figured out how to use my boot screen to log in as root. It is a Suse screen that lists:

Suse 10.0
Ubuntu
Suse 10.0 Failsafe
Memtest

With F-1 for Help and F-2 for Boot Options. I let it go to Suse 10.0 and press F-2 and type in 'root /dev/hda2' but that doesn't do it. Then when I get to the Suse login screen there don't appear to be any options which is odd as I have created 3 user accounts.
 
  


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
FATAL error: root password not recognized smiley_lauf Linux - Newbie 3 02-12-2006 11:18 PM
cd is not recognized newtie SUSE / openSUSE 3 06-13-2005 02:33 AM
eth0 recognized but not recognized? rafc Linux - Newbie 7 04-21-2004 04:13 AM
root files: create as root:root or root:wheel? pcass Linux - Security 1 02-07-2004 04:14 PM
Root password not recognized (KDE). . . alpha_male Mandriva 1 09-13-2003 07:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

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