LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training 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 11-14-2011, 01:12 PM   #1
chasfgr
LQ Newbie
 
Registered: Aug 2010
Location: Waters Upton, UK and on a boat in Greece
Distribution: Open SuSe
Posts: 15

Rep: Reputation: 0
Repair SuSe 11.4, original login data lost


After 72 hours of failure in trying to get a brand-new laptop to dual-boot, Linux and Win 7, I stumbled on the solution.

Now I can boot into the two OS, but the originally entered login info appears to have been overwritten and I cannot get into Linux.

Can anyone tell me how to change the login info in the SuSe 11.4?
The original instruction was to ignore the login screen on first booting. A user name and password were recorded for administrator rights.
The latter two are the ones not working.
 
Old 11-15-2011, 01:05 AM   #2
thinmintaddict
LQ Newbie
 
Registered: Apr 2011
Location: Austin, TX
Distribution: Arch Linux
Posts: 12

Rep: Reputation: 6
I'm assuming that you mean that your password data for a user account was corrupted.

I don't actually have an openSUSE installation, but if you haven't set a root password (or know your root password) you should be able to boot into single-user mode (init 1) and "passwd username". most distros have a "fallback (Recovery Mode)" option in grub already that will boot you into single user mode.

Past that if you know anyway to get into the system you can edit the /etc/shadow file directly.

If the whole account was lost, you can add an account from single user mode with "adduser" or "useradd" (Not sure which one SUSE uses.)
 
Old 11-15-2011, 01:24 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
I had changed my root password on my netbook, and not used it for some time (forgetting the new root password). To change the root password back, I entered "init=/bin/sh" to the kernel parameters.
Then I mounted the root (/) directory, and chrooted to it.

mount <device> /mnt/
chroot /mnt/
passwd
<new_password>

If you find the root account is locked out because there is no password, and you know your regular users password, you can copy the hash part from the regular password to the root entry in /etc/shadow.

Another thing you can try is to edit out the hash between the second "$" and the first ":" characters. I don't remember if SuSE (and the PAM) configuration allows this. If it does, you can reboot with a null root password then change it with the "passwd" program.

Last edited by jschiwal; 11-15-2011 at 01:47 AM.
 
Old 11-15-2011, 02:18 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Here is a howto for openSuSE:
http://www.susetips.com/2009/02/16/r...root-password/
 
Old 11-16-2011, 02:34 AM   #5
chasfgr
LQ Newbie
 
Registered: Aug 2010
Location: Waters Upton, UK and on a boat in Greece
Distribution: Open SuSe
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks everybody for the responses.

Tried 1, just booted normally

Have entered "init=/bin/sh"

Invokes in-kernel resume - fsck succeeded - mounted root device read-write
mount -o rw,acl,user_xattr -t ext4 /dev/sda7/root
sh: cannot set terminal process group (-1): Inappropriate ioctl for device
sh:no job control in this shell
sh-4.1#

Did the same x3 (well at least it's consistent)
 
  


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
Tried to repair - lost Linux davholla Linux - Newbie 5 08-24-2011 05:51 AM
Lost the login screen of SUSE 10.1 biscit Linux - Desktop 4 03-01-2009 02:20 PM
HDD partition lost. xandros DVD + me = lost data lein Linux - General 18 05-22-2007 05:47 AM
Howto recover lost and formatted data on lost partitions. Sören Schneider LinuxQuestions.org Member Success Stories 2 04-05-2006 06:38 AM
data repair tharive Linux - Software 1 05-10-2005 01:17 PM


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