Debian This forum is for the discussion of Debian 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
|
09-09-2005, 02:54 AM
|
#1
|
Member
Registered: Apr 2003
Location: Malaysia
Distribution: Slackware 10.2
Posts: 75
Rep:
|
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...
|
|
|
09-09-2005, 03:00 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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.
|
|
|
09-09-2005, 03:07 AM
|
#3
|
Member
Registered: Apr 2003
Location: Malaysia
Distribution: Slackware 10.2
Posts: 75
Original Poster
Rep:
|
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.
|
|
|
09-09-2005, 03:13 AM
|
#4
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
no, you don't edit enything permanently, just hit x or whatever in lilo to edit it instantly.
|
|
|
09-09-2005, 03:15 AM
|
#5
|
Member
Registered: Apr 2003
Location: Malaysia
Distribution: Slackware 10.2
Posts: 75
Original Poster
Rep:
|
oh no........
normal user won't be able to edit inittab and lilo.conf.......
please advice....
|
|
|
09-09-2005, 03:25 AM
|
#6
|
Member
Registered: Apr 2003
Location: Malaysia
Distribution: Slackware 10.2
Posts: 75
Original Poster
Rep:
|
am i asking a stupid question here...
hahaha....i think so....
sorry for that...
|
|
|
09-09-2005, 03:58 AM
|
#7
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
i've said twice now you don't edit ANY files... please read what i'm saying
|
|
|
03-06-2007, 07:05 AM
|
#8
|
LQ Newbie
Registered: May 2005
Location: Libya
Distribution: redhat enterprise 4
Posts: 29
Rep:
|
at lilo type
linux single
then u can boot as root without asking for a passwd, and u can change it then.
|
|
|
03-06-2007, 07:59 AM
|
#9
|
Senior Member
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100
Rep:
|
Debian uses grub by default, not lilo. When the grub menu appears, hit "e" for edit, then add the runlevel you want.
Peace,
JimBass
|
|
|
03-06-2007, 11:42 AM
|
#10
|
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:
|
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.
|
|
|
03-06-2007, 11:48 AM
|
#11
|
Senior Member
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100
Rep:
|
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
|
|
|
03-06-2007, 12:16 PM
|
#12
|
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:
|
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 04:55 PM.
|
|
|
03-06-2007, 03:51 PM
|
#13
|
Member
Registered: Nov 2005
Location: Houston Texas
Distribution: Debian Sid
Posts: 379
Rep:
|
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.
|
|
|
03-06-2007, 04:38 PM
|
#14
|
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:
|
Tried that, too ... Still wants my root password.
|
|
|
03-07-2007, 03:18 AM
|
#15
|
Member
Registered: Jul 2006
Distribution: Debian Testing
Posts: 299
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 02:45 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|