SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235
Rep:
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???
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???
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...
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235
Original Poster
Rep:
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.
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235
Original Poster
Rep:
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???
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235
Original Poster
Rep:
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.
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...
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235
Original Poster
Rep:
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:
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.
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...
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235
Original Poster
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.