LinuxQuestions.org
Help answer threads with 0 replies.
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 08-30-2007, 03:00 PM   #1
Corfy
LQ Newbie
 
Registered: Apr 2005
Location: Near Indianapolis, IN
Distribution: Kubuntu 8.04
Posts: 8

Rep: Reputation: 0
Don't know root, user passwords (OpenSUSE 10.1)


My office recently purchased a business just north of us, and I have been put in charge of their IT stuff.

For the most part, they are Windows based. However, they have OpenSUSE 10.1 installed on a computer in the office that seems to be acting as a DNS and DHCP server. However, nobody at the office has any clue what the passwords are for that system, whether talking about the root user or either of the users set up on the computer. Heck, nobody seemed to know what the computer even did, all they knew was it was set up "sometime in November", that their network is much more stable since it was set up, and they left it alone (this computer hasn't been touched since November and it seems to be working perfectly... I can't imagine leaving a Windows server alone for 10 months). I only discovered the DNS and DHCP functions by looking at the ipconfig on the Windows workstations. It may be doing something else that I'm not aware of, which is the only thing thing keeping me from wiping the system and installing a different distro.

This server was apparently set up by a computer tech company in town that has since gone out of business, so I can't ask them, and nobody at the office knows anything about computers (finding the on switch is taxing some of them).

I am still something of a Linux newb, especially when it comes to the administration side, and I have done zero work with server-level functions. I started using Linux at home part-time about two and a half years ago, and switched to it as my primary OS last year, but I am more of a semi-advanced user rather than an administrator. And my experience comes from Debian and Ubuntu, not any variations of SUSE.

I've seen a few sets of instructions on how to reset the root password, but most of them seem to require (at least somewhere in the process) the ability to log in as a user, which I currently can't do because I don't know those passwords, either.

So if someone could either give me some instructions on how to reset all these passwords, or point me to some documentation that would show me how to do it, I would appreciate it. And it would be helpful (and won't hurt my feelings a bit) if you assumed I was a complete newb. I have wide enough gaps in my knowledge that you can't assume I know anything.

I will add that I'm not afraid of the command line. I am, however, concerned about messing up this server in a way that would keep them from working, which is something I'm not usually worried about when tinkering with my home system.
 
Old 08-30-2007, 04:21 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,807

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
If you have access to the hardware, there is always a way to disable the password.

If the bootloader is not password protected, you can (at least with GRUB) stop the boot process and edit the kernel command to add the word "single". This puts you in single-user mode with no password + root powers. When the grub menu first appears, hit tab to stop the countdown, then "e" for edit. (I assume there is a similar proceedure for LILO.)

As a last resort, you can boot from a live CD Linux distro and edit the /etc/passwd file to remove the first "x" in the root entry. After editing, the line should look like this:
root::0:0:root:/root:/bin/bash
You will now be able to boot into the system and login as root with no password.
 
Old 08-30-2007, 04:40 PM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
You could even grab another PC and set that up to provide the same function (DNS & DHCP) so you can remove the old PC and investigate it at your leisure. You'll know if it provides another function when you receive complaints from users
 
Old 08-31-2007, 07:33 AM   #4
cutegoat
LQ Newbie
 
Registered: Aug 2007
Location: Kocaeli / Turkey
Distribution: SuSE
Posts: 6

Rep: Reputation: 0
Quote:
Originally Posted by pixellany View Post
If you have access to the hardware, there is always a way to disable the password.

If the bootloader is not password protected, you can (at least with GRUB) stop the boot process and edit the kernel command to add the word "single". This puts you in single-user mode with no password + root powers. When the grub menu first appears, hit tab to stop the countdown, then "e" for edit. (I assume there is a similar proceedure for LILO.)
If you don't know the root password, you can not login into single user mode.

You must boot from SUSE cd #1 or DVD and continue with "Rescue System". Now you may login as root with no password. May be you think to make "passwd root" for resetting the root password, but it won't work. Because you are working on a ramdisk without your local disks mounted. So first you have to mount your / partition.

- mkdir /any_dir
- fdisk -l (if you don't know the partition order, you must try a bit for the correct partition)
- mount /dev/sda3 (or any other disk partition else) /any_dir
- vi /any_dir/etc/shadow

root:gF8DgBn0RvNcE:13613:0:10000:::: clear the crypted password ->
root::13613:0:10000::::
- init 6

and now you are able to login as root without any password.

There are some other ways (knoppix, etc.) for root password recovery but this is the simpliest way i think.

Conclusion: You lose everything if you lose the physical security of your servers..
 
Old 08-31-2007, 09:24 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,807

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
Quote:
Originally Posted by cutegoat View Post
If you don't know the root password, you can not login into single user mode.
You certainly can---I just did it on my machine!!!
 
Old 08-31-2007, 12:32 PM   #6
raazman
LQ Newbie
 
Registered: Feb 2005
Distribution: Suse 10.2
Posts: 19

Rep: Reputation: 0
What is the use of passwords if someone can get into your system with single user? Doesn't the "single" user have full permissions over the system while logging in as single? I'm really confused at how the single option works. If anyone could explain this more clearly, that would be great.
 
Old 08-31-2007, 12:58 PM   #7
kav
Member
 
Registered: May 2006
Location: USA
Distribution: FreeBSD Ubuntu Debian
Posts: 137

Rep: Reputation: 15
Quote:
Originally Posted by raazman View Post
What is the use of passwords if someone can get into your system with single user? Doesn't the "single" user have full permissions over the system while logging in as single? I'm really confused at how the single option works. If anyone could explain this more clearly, that would be great.
like cutegoat said
Quote:
Conclusion: You lose everything if you lose the physical security of your servers..
Single user mode is a mode in which a multiuser computer operating system boots into a single superuser. In other words, you're logging in as root without running all the background system processes or letting anyone else log in. You can use it to access low level system resources that would otherwise be in use. For instance if I wanted to restore one of my partitions to a previous state I might use single user mode.


That grub trick is a good idea. I'll have to try it and see if my systems demand a password for single user mode or if it's like pixellany said. Whenever I do a shutdown now without the -h it requires a password after going down, so I'm thinking they would. I usually load a liveCD, do a chroot, then run passwd rather than editing the password file manually. Thanks for the tip
 
Old 08-31-2007, 01:34 PM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,807

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
Quote:
Originally Posted by raazman View Post
What is the use of passwords if someone can get into your system with single user? Doesn't the "single" user have full permissions over the system while logging in as single? I'm really confused at how the single option works. If anyone could explain this more clearly, that would be great.
If you have physical access to a computer, you can get in with full privileges. The only protection would be to lock the computer in a cabinet. Otherwise, the protection is simply that the average passerby does not know all the tricks.

I assume that the "single-user" designation somehow relates to the idea that--if you are the ONLY user--you must be the SUPER user.

This is all loosely related to the truism that "locks are for honest people". (Which is why none of my cars have alarms---and why some people do not lock their cars. (they don't want their car damaged while some thief is stealing their chewing gum.))
 
Old 08-31-2007, 01:44 PM   #9
raazman
LQ Newbie
 
Registered: Feb 2005
Distribution: Suse 10.2
Posts: 19

Rep: Reputation: 0
gotcha!! thnx
 
Old 09-02-2007, 08:13 PM   #10
seelenbild28
Member
 
Registered: Oct 2005
Location: Germany, Berlin
Distribution: SuSE Linux 9.1/9.2/9.3/10.0/10.1, openSuSE 10.2, 10.3, Slackware, Debian, Redhat, BSD
Posts: 315

Rep: Reputation: 30
this is a interesting topic. the question if it is useful to have "single user mode" to crack the root password is of course necessary. On the other hand. Every guy, as pixellany said already, could - if he has physical access to the machine - take a live cd and boot from that to change passwords. But, nobody would ask: "why is it possible to change passwords with live cd's? prohibit them!"*g so, what is the essence?

and of course, pixellany is right, it is possible with opensuse to get into single user mode....
 
Old 09-10-2007, 11:10 PM   #11
geoffmat
LQ Newbie
 
Registered: Feb 2007
Posts: 8

Rep: Reputation: 0
I get "read only system"

When I try mkdir I get the error "Cannot create directory "test" : read-only file system"

Did I miss a step?

Thanks for your help!
G

Quote:
Originally Posted by cutegoat View Post
If you don't know the root password, you can not login into single user mode.

You must boot from SUSE cd #1 or DVD and continue with "Rescue System". Now you may login as root with no password. May be you think to make "passwd root" for resetting the root password, but it won't work. Because you are working on a ramdisk without your local disks mounted. So first you have to mount your / partition.

- mkdir /any_dir
- fdisk -l (if you don't know the partition order, you must try a bit for the correct partition)
- mount /dev/sda3 (or any other disk partition else) /any_dir
- vi /any_dir/etc/shadow

root:gF8DgBn0RvNcE:13613:0:10000:::: clear the crypted password ->
root::13613:0:10000::::
- init 6

and now you are able to login as root without any password.

There are some other ways (knoppix, etc.) for root password recovery but this is the simpliest way i think.

Conclusion: You lose everything if you lose the physical security of your servers..
 
Old 09-28-2007, 09:16 AM   #12
cutegoat
LQ Newbie
 
Registered: Aug 2007
Location: Kocaeli / Turkey
Distribution: SuSE
Posts: 6

Rep: Reputation: 0
Quote:
Originally Posted by geoffmat View Post
When I try mkdir I get the error "Cannot create directory "test" : read-only file system"

Did I miss a step?

Thanks for your help!
G

You must type -rw to option field while you while GRUB loading.
 
Old 04-16-2008, 07:49 AM   #13
hongnguyen70
LQ Newbie
 
Registered: Jan 2008
Posts: 23

Rep: Reputation: 15
HI Pixellany

I have tried to edit the file for my root password and now when I try to open Yast it comes up with this error message
"Su returned with an error "

I did also try to follow another thread like this:

"- mkdir /any_dir
- fdisk -l (if you don't know the partition order, you must try a bit for the correct partition)
- mount /dev/sda3 (or any other disk partition else) /any_dir
- vi /any_dir/etc/shadow

root:gF8DgBn0RvNcE:13613:0:10000:::: clear the crypted password ->
root::13613:0:10000::::
- init 6 "

I guess I have messed up the user root. Do you know how I can go about to fix it. I dont understand, I had webmin installed and I could go in there to change the root password , it changed ok but I could not log on after that.

Please help

Many thanks
 
  


Reply

Tags
password, recovery, root


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
Sound works on root but not on user(OpenSuse 102) WDSnav Linux - Newbie 2 09-23-2007 12:51 AM
two root passwords openbysource Red Hat 4 12-02-2005 07:19 AM
Help! root has two passwords! jev-bird Linux - Security 13 11-25-2004 06:23 PM
Root & user logins : Passwords? Why not encryption keys instead? furfurdemon666 Linux - Security 4 07-02-2004 09:17 AM
Is there a way to sync Samba passwords with linux user passwords MarleyGPN Linux - Networking 2 09-09-2003 10:59 AM

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

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