DebianThis 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.
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.
it doesn't help.
the case is not that i forget my passwd for root , but i have no chance to input my passwd.when i have input username and kick RETURN,it display:Login incorrect..
and i can't use passwd to reset my passwd,after i booted into single user mode.
if i use apt-get to install new tools , some warning happen:
Code:
Gtk-WARNING**:cannot open display:at/usr/share/perl5/Debconf/FrontEnd/Gnome.pm line 47
debconf:unable to initialize frontend:Gnome debconf:(DISPLAY:problem?)
debconf:failing back to frontend:Dialog.
I still have trouble understanding why the following advice (quoted from the link in my earlier post) wouldn't work in your case:
Quote:
Follow these steps to reset the password using Knoppix:
* Reboot the system and configure it to boot from the Knoppix CD (instructions available here)
* At the Knoppix Boot Prompt (See Fig. 3 below) enter: knoppix lang=us to start boot Knoppix using the english locale. If you understand German, feel free to just hit 'Enter' to boot into Knoppix.
* Once the system finishes booting, press <Ctrl> + <Alt> + <F1> (The Control, Alt and F1 key together) to switch to a virtual terminal.
* Type mkdir mountplace to create a directory called 'mountplace'. This is where we will mount the filesystem.
* Type mount /dev/hdaX mountplace, where /dev/hdaX is your root partition. More information on Linux partitions is available here.
* Change to the "/etc" directory on your root partition by typing cd mountplace/etc.
* Use your favorite text editor and open the 'shadow' file for editing. I use 'vi', so I type vi shadow (If you have a really old system, you won't have a shadow file, in which case you need to edit the 'passwd' file.)
* Scroll down to the line containing the root user's information, which looks something like:
root:dsfDSDF!s:12581:0:99999:7:::
* Delete everything between the first and second colons, so that the line looks like:
root::12581:0:99999:7:::
* Save the file and exit your editor.
* Type cd to return to your home directory.
* Type umount mountplace to unmount the partition.
* Type reboot to reboot your system, and remove the Knoppix CD from the drive.
* Now you can log into your system as root with no password. Make sure you change the password immediately.
The apt-get problem is easier to solve -- "su" to root, run "dpkg-reconfigure debconf", and choose "dialog" as the debconf frontend. This should end the warning messages.
thanks for your help....
the apt-get problem has been resolved..
but i still can't log in...
i boot into single user mode and it doesn't need passwd for root .and i edited the /etc/passwd file..
i think there is nothing different with editing it using knoppix live CD..
it doesn't work...
when i init 3,
thanks for your help...
my shadow likes this: root:$1$VSmtQ7QN$teCn6uRQdREVwXlkaPQfE0:12931:0:99999:7:::
i edit it as: root::12931:0:99999:7:::
and i reboot my box;
it doesn't help
and i boot into single user mode again(now it doesn't need any passwd in single user mode ,but in level 3, it doesn't work). i edit /etc/passwd as:
root::0:0:root:/root:/bin/bash (root:x:0:0:root:/root:/bin/bash)
it doesn't help too.
Sorry, my knowledge ends here. I once lost my root password, booted Knoppix and accessed /etc/shadow, edited it just like you did, didn't touch /etc/passwd and it worked for me. I don't know why it doesn't work for you.
The top line in my /etc/passwd was then (and is still now):
root:x:0:0:root:/root:/bin/bash
There's definitely something very strange with your system if you can login as normal user and use apt-get without entering root password (or, apparently, any password). It isn't very healthy for your system that normal user has root privileges all the time. Maybe you could set the root password as normal user with the "passwd root" command. If that succeeds, you should probably back up your data, login as root, delete the user with abnormal rights with the "deluser" command and add a new user with the "adduser" command (and then possibly give the new user a password with "passwd" -- I don't remember if giving password is included with "adduser").
Last edited by Dead Parrot; 05-29-2005 at 04:17 AM.
thanks very much...
i can't use apt-get when i log as normal user..
i use apt-get when i am root...
there is definitely somthing wrong with my system,but i don't know..
i tried "passwd root".it doesn't help...
thanks for all your help...
i can't use apt-get when i log as normal user..
i use apt-get when i am root...
OK, I guess you use apt-get in single user mode. (How else could you use apt-get as root when you cannot login as root?)
I got another idea. You could install sudo, add your user to sudoers and then do as normal user "sudo passwd root". I don't remember exactly how adding user to sudoers goes but it's something like this: boot into single user mode and edit /etc/sudoers . In /etc/sudoers there's a line for root, add a similar line for your normal user. Also do "adduser user_name sudo" (where "user_name" is your user name). After that you should be able to use sudo as normal user.
Last edited by Dead Parrot; 05-30-2005 at 12:50 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.