LinuxQuestions.org
Review your favorite Linux distribution.
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 05-22-2007, 10:34 AM   #1
vegetassj2
Member
 
Registered: Jan 2005
Posts: 201

Rep: Reputation: 30
To shy to put this in the title...


Hi,

I changed my password on a sparecomp yesterday. I thought I memorised the password correctly, but it appears I don't.... Is there any way to get back my password without loggin in as root? (This is a comp which my dad has the rootpass from and he'll come back late and I need to do some stuff for school (where the documents are which I need)).

Probably not, but if there is, please help me!
 
Old 05-22-2007, 10:40 AM   #2
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
Not really. You could boot the computer into single-user mode and get root without knowing the root password, and then reset the password that way. Hope that helps.
 
Old 05-22-2007, 10:41 AM   #3
vegetassj2
Member
 
Registered: Jan 2005
Posts: 201

Original Poster
Rep: Reputation: 30
how do I get root whitout a pass?
 
Old 05-22-2007, 10:49 AM   #4
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
When you reboot, at the grub menu (assuming your bootloader is grub), hit "e" to edit the commands before booting. You should then see a line like
Code:
kernel /vmlinuz-2.4.20-6 ro root=LABEL=/
Type a space after the slash, and then type a 1 to go into single-user mode. You should be root at that point.
 
Old 05-22-2007, 10:58 AM   #5
[KIA]aze
Member
 
Registered: Jun 2006
Distribution: Debian, Ubuntu, Windows XP
Posts: 146

Rep: Reputation: 16
Can this root password bypass be deactivated?

Because this basically means that any kind of child-protection on a computer is worthless (and also that any root protection in a company using linux can be bypassed)!
(booting from a live-CD can be deactivated in the BIOS setup, which can be password protected)

Can the "edit" function of grub be deactivated?
 
Old 05-22-2007, 11:05 AM   #6
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
To my knowledge, it cannot be deactivated. The philosophy is that physical access to a machine equates to root access.
 
Old 05-22-2007, 11:06 AM   #7
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,969
Blog Entries: 1

Rep: Reputation: 208Reputation: 208Reputation: 208
You can password protect grub
 
Old 05-22-2007, 11:12 AM   #8
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
That would be a good work around, as long as it's not a problem that you have to have physical access to the machine every time you reboot. Frankly, I don't want to have to go to the datacenter every time I upgrade the kernel. But if you always have physical access to the machine, that would work fine.
 
Old 05-22-2007, 11:25 AM   #9
[KIA]aze
Member
 
Registered: Jun 2006
Distribution: Debian, Ubuntu, Windows XP
Posts: 146

Rep: Reputation: 16
So if the BIOS and grub are password protected and booting from a CD is disabled, it's impossible to get the root password without touching the hardware (i.e connecting the HD to another PC for ex), right?
 
Old 05-22-2007, 11:31 AM   #10
asimba
Member
 
Registered: Mar 2005
Location: 127.0.0.0
Distribution: Red Hat / Fedora
Posts: 355

Rep: Reputation: 42
try init=/bin/bash in grub.conf

hope that helps.
 
Old 05-22-2007, 11:35 AM   #11
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
Let me clarify: Booting into single-user mode does not allow you to get the root password; it allows you root-level access. You could change the root password at that point, but you cannot determine what it is and then use it later.

But to answer the question I think you are interested in, disabling booting from CD and password-protecting grub will prevent getting root access by booting to single-user mode.
 
Old 05-22-2007, 01:43 PM   #12
vegetassj2
Member
 
Registered: Jan 2005
Posts: 201

Original Poster
Rep: Reputation: 30
this all sounds very complicated

I'll just wait till my dad returns... thanks for the help anyway
 
Old 05-22-2007, 02:56 PM   #13
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,275

Rep: Reputation: 126Reputation: 126
Quote:
this all sounds very complicated

I'll just wait till my dad returns... thanks for the help anyway
Considering that your dad hasn't given you the root password, I think you're making the right choice.
 
Old 05-23-2007, 06:00 AM   #14
[KIA]aze
Member
 
Registered: Jun 2006
Distribution: Debian, Ubuntu, Windows XP
Posts: 146

Rep: Reputation: 16
Quote:
Originally Posted by zaichik
Let me clarify: Booting into single-user mode does not allow you to get the root password; it allows you root-level access. You could change the root password at that point, but you cannot determine what it is and then use it later.

But to answer the question I think you are interested in, disabling booting from CD and password-protecting grub will prevent getting root access by booting to single-user mode.
Yes, I indeed meant root access, not getting the root password.
And I should have added disabling all other boot methods except boot from hard disk.
But those are of course really extreme measures. ^^

However, by booting into single user mode that way, it is still possible to get the root password from the password and shadow files I suppose, even though I don't know exactly how to do this.
 
Old 05-23-2007, 08:49 AM   #15
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Actually, Unix/Linux uses a one-way encryption system, so you can't retrieve the password, unless you want to try brute-forcing it, which would a take a lot of cpu/time ...
To be a little clearer, when you enter your plaintext passwd, it encrypts that and compares the encrypted version to the stored encrypted version. It never decrypts.

Last edited by chrism01; 08-27-2007 at 02:09 AM.
 
  


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
Can't call method "title" on undefined title in Perl script scuzzman Programming 12 12-11-2009 05:40 AM
title Polanski Linux - Laptop and Netbook 0 05-08-2006 10:18 PM
under with title and sub title the "GTK devel" found in fc3? AKAKAK Fedora 3 02-27-2005 06:51 AM
Doesn't the title of this forum say: Nu-Bee Linux - General 0 01-09-2003 12:13 PM
Title gcombe74 Linux - General 5 07-14-2001 02:35 AM


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