Guest Belgarion Posted November 27, 2004 Report Share Posted November 27, 2004 Hello, I have very big problem with the "root" user and password. I've lost my root password yesterday (my last connection as root was 6 months ago) and I try to follow a how-to to recover it : boot in "linux single" delete line "root" in etc/passwd delete line "root" in etc/shadow enter passwd to set new root password. BUT when I try "passwd" the system answer "can not identify you" and when I try "passwd root" it says "unknown root user" Now when I reboot my system I no longer have root user I can't do "su root" it says "unknown root user" (and I also have to start Xserver by log in and enter startx, I no longer have graphic mode to log in) I've downloaded the mandrake 10.0 ... (mdk 9.2 now) Do you think that if I try to upgrade my system it will recover these problems without losing users datas ??? thanks a lot for your help Quote Link to comment Share on other sites More sharing options...
Guest anon Posted November 27, 2004 Report Share Posted November 27, 2004 Welcome. Never had to do this, but from what i remember readinging somewhere, try this. Boot into a consol and type linux single then enter. Then type passwd root press enter. It then (i think) asks for your new password. enter it and then reboot. Quote Link to comment Share on other sites More sharing options...
Michel Posted November 28, 2004 Report Share Posted November 28, 2004 (edited) I'm interested to hear if anon's recovery-method works, but if it doesn't ... *I'm not sure, but I don't think you had to delete the complete root-line .. now you don't have a root-user anymore. Add it again. You can use the command "adduser" for this. you can also start using "linux init=/bin/bash". *Not sure if an upgrade will help ... since I suppose that it doersn't touches your user-configuration. I don't think it's needed anyway. *If the above fails .. try to use a bootable cd like knoppix and change add the users from there if possible ... (I suppose so). You could try this then: Mount your real root-partition. Execute the chroot-command to make your real rot-partition the root instead othe knoppix one. execute the useradd-command : you'll maybe have to specify the absolute path (/sbin/useradd or something like that), but I sdon't think this will be necessary. That's it I suppose ... Check if /etc/passwd, ... contain your new user root. With usermod, you can change data about users. Hopes this helps. Edited November 28, 2004 by Michel Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.