Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Hello all expert Linux administrator, i have a very basic problem where i have deleted the /etc/shadow files. I not longer can login to multiuser mode and root user.
Any idea how to solved it ?
I hope you all can help me.
THanks for your help.
Your help is greatly appreciated by me and others.
You would need to reinstall the file from the original packages (so that you have a sane file to build from) and then manually replace the data that had been removed; which would include the username/password of all users added since the machine was setup, and any passwords you have changed for built in users (such as root).
The easiest thing to do is boot the machine with a live CD (or the install CD, if it doubles as a live/rescue CD) and then edit the file that way. Where you are going to get the original file depends on which distribution you are running, which you did not specify.
I using fedora 7. I not very understand what you say.
My understanding is boot from the live cd, and install the /etc/shadow file.
What i understand:
1. Boot to live cd.
2. Change the root password to previous install root password in the live cd environment and the normal user as well.
3. Install the /etc/shadow.
Is this correct ?
I don't know which file to choose to install ?
Thanks for your help.
Your help is greatly appreciated by me and others.
Alternative approach: install another Fedora 7 and copy over its /etc/password file. This should create the default settings; you may need to make additions for any users you added manually.
...and the entries for the daemons that where installed you can get with 'rpm -qa --scripts | egrep -A 3 "(user|group)add" > /tmp/rpmlogins'. /tmp/rpmlogins will contain the rough snippets, so with a little bit of shellscripting knowledge you can add those entries back in quickly.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.