LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices



Reply
 
Search this Thread
Old 09-09-2005, 03:54 AM   #1
ckamheng
Member
 
Registered: Apr 2003
Location: Malaysia
Distribution: Slackware 10.2
Posts: 74

Rep: Reputation: 15
How could normal user obtain root password or change root password


well, i am running Debian as a normal user.
i need to obtain root password so that i can mount my Win XP drive and make new directory, shuting down my system.....etc.

Anyway i can obtain the root password or change the root password. I heard i may do it in single user mode.

1. edit the inittab file, make the default run level as single user mode, which is 1.
2. press the hardware button, shutdown the pc ....
3. turn on the pc again..
4. it will enter the single user mode
5. type passwd command on the shell, and change the root password...

Is this way workable?????????
Please advice..Thanks...
 
Old 09-09-2005, 04:00 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
yeah that'll work. bit overkill though, don't edit inittab, instead just temporarily add "1" to the boot command in lilo or grub when it loads up.
 
Old 09-09-2005, 04:07 AM   #3
ckamheng
Member
 
Registered: Apr 2003
Location: Malaysia
Distribution: Slackware 10.2
Posts: 74

Original Poster
Rep: Reputation: 15
How to edit the lilo file by adding "1" to the boot command...can anyone show me the sample lilo file ???

btw, why shouldn't i edit the inittab file??
i will change it back to multiuser mode once the root password is changed successfully.

Please advice. thanks.
 
Old 09-09-2005, 04:13 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
no, you don't edit enything permanently, just hit x or whatever in lilo to edit it instantly.
 
Old 09-09-2005, 04:15 AM   #5
ckamheng
Member
 
Registered: Apr 2003
Location: Malaysia
Distribution: Slackware 10.2
Posts: 74

Original Poster
Rep: Reputation: 15
oh no........
normal user won't be able to edit inittab and lilo.conf.......

please advice....
 
Old 09-09-2005, 04:25 AM   #6
ckamheng
Member
 
Registered: Apr 2003
Location: Malaysia
Distribution: Slackware 10.2
Posts: 74

Original Poster
Rep: Reputation: 15
am i asking a stupid question here...
hahaha....i think so....
sorry for that...
 
Old 09-09-2005, 04:58 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
i've said twice now you don't edit ANY files... please read what i'm saying
 
Old 03-06-2007, 08:05 AM   #8
jasem200
LQ Newbie
 
Registered: May 2005
Location: Libya
Distribution: redhat enterprise 4
Posts: 28

Rep: Reputation: 15
at lilo type
linux single
then u can boot as root without asking for a passwd, and u can change it then.
 
Old 03-06-2007, 08:59 AM   #9
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
Debian uses grub by default, not lilo. When the grub menu appears, hit "e" for edit, then add the runlevel you want.

Peace,
JimBass
 
Old 03-06-2007, 12:42 PM   #10
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 60
I must not be understanding the question. It sounds to me like you want to somehow gain root privileges without knowing the current root password. Hopefully it's not nearly as simple as the suggestions above. I usually get to single user mode in Debian by typing "telinit 1" at a command prompt. But you still need the root password to go any further.
 
Old 03-06-2007, 12:48 PM   #11
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
You can always reset the root password with physical access to the box. You just boot into runlevel 1, which can only be blocked if you password protect your grub/lilo screen. Over a network, even a LAN you can't do anything without knowing the root pass, but it is trivially easy to get around if you can be there while it is booting.

Peace,
JimBass
 
Old 03-06-2007, 01:16 PM   #12
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 60
I must be dense, but I can't figure out how to do it. I can boot to runlevel 1 (single user mode), no problem, but once there I have to enter the root password, or hit Control-D, which simply returns me to a normal boot sequence.

I will try again later today.

Last edited by rickh; 03-06-2007 at 05:55 PM.
 
Old 03-06-2007, 04:51 PM   #13
BillyGalbreath
Member
 
Registered: Nov 2005
Location: Houston Texas
Distribution: Debian Sid
Posts: 379

Rep: Reputation: 31
With Debian you must supply the root password if you boot with "single" in GRUB. Instead, boot with "-s". This will bring up a shell before it brings up init. You can change your root password that way.
 
Old 03-06-2007, 05:38 PM   #14
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 60
Quote:
Instead, boot with "-s"
Tried that, too ... Still wants my root password.
 
Old 03-07-2007, 04:18 AM   #15
Tortanick
Member
 
Registered: Jul 2006
Distribution: Debian Testing
Posts: 299

Rep: Reputation: 30
Nice to see that debian is secure against such easy attacks.

You could use a Live CD, log into the live CD as root, mount you're harddrive, chroot into the hard drive, then change you're password. If debian is installed on hda2

I think this would do it.
Code:
mount /dev/hda2 /mnt
chroot /mnt
passwd
 
  


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
anyone can change my root or user password? coolblue Linux - Newbie 16 10-09-2005 04:51 AM
Can unlock screen with root password in my user account - want to change this sm1 Linux - Newbie 2 07-24-2005 06:54 AM
Help! Cannot Add a User to User Manager or Change Root Password lennysokol Linux - General 2 06-25-2005 10:59 AM
Password change for root? akihandyman Mandriva 1 08-25-2004 11:29 PM
when i change root password ,it says: BRAHmS Linux - General 0 05-11-2004 10:15 PM


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