Unable to Login after editing the etc/passwd file LM17
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
'Keys: Press S to skip mounting or M for manual recovery'. This time I pressed only M and created another user and exited and restarted. But again the same message appeared.
Message appears due to impossibility to mount filesystems and it's irrelevant to your users accounts if you had enough free space to create new account. And since you got this message before creating new user, seems free space isn't an issue.
It would be sane to check (in recovery mode) which filesystems you have mounted. Does all the entries from fstab mounted with proper options?
And do you have enough free space? What "df -h" shows?
And you can run e2fsck on you partitions to check it's status.
Message appears due to impossibility to mount filesystems and it's irrelevant to your users accounts if you had enough free space to create new account. And since you got this message before creating new user, seems free space isn't an issue.
It would be sane to check (in recovery mode) which filesystems you have mounted. Does all the entries from fstab mounted with proper options?
And do you have enough free space? What "df -h" shows?
And you can run e2fsck on you partitions to check it's status.
Thank you Teufel,
Yes, I have enough free space. I checked by logging on with LiveUSB. I saw that all the entries from fstab mounted with proper options.
Try to login as new user and test it. If all seems good, do the same for other users.
Once you system became usable, you can remove old users and their home directories.
Teufel,
Since this did not resolve the issue I just had an after-thought from your suggestion.
Since I have backed up all the users' documents and files, I was thinking if I could use the recovery console to delete all the old user accounts including the Root, and create new user accounts. Will it resolve my issue? If so, how to do that?
And can I completely delete the etc/passwd file by logging in with LiveUSB and later generate an entirely new etc/passwd file with the help of the recovery console? If so how to do it?
I wouldn't suggest to delete or modify /etc/password directly.You already ran into problem due to modifying it. There are few utilities to manage users (useradd, userdel, usermod, passwd and so on).
Before managing your users, boot into liveCD, mount your Mint partition and look at <mountpoint>/etc directory. There should be passwd backup file named as "passwd-" or "passwd.bak". System creates such a backup every time you using accounts managing tools. If so, copy it over your damaged passwd and try to reboot and log in.
But if you still want to modify it directly or delete it at all, you have to keep in mind that you shouldn't delete root user.
You might look there at linuxmint passwd sample: https://www.ibm.com/developerworks/c...iles19?lang=en
I tried the 'usermod' as suggested in the recovery mode. But as you said the damage has been done. It didn't work.
Yes, really I shouldn't have done manual editing with my kind of ignorance of the OS. I took suggestions from the web and tried somethings earlier. Since they didn't work, I tried this reckless thing.
Thank you for the information and caution sounds greek 2 me.
Regards
Anil
Don't feel bad. We all had our share of tweaking with our computers and operating systems, it's how we learn and experience is the best teacher with success and failures.
Awhile back, Leo Leporte who's been around computers and technology, messed up his ubuntu by following many suggestions from an IRC channel. His main OS of choice is Apple's IOS and maybe some windows. He dabbles with linux on a limited basis. As you can see, even a veteran computer user like Leo can make mistakes.
Good luck
Last edited by sounds greek 2 me; 12-14-2014 at 01:02 PM.
Why I did it?
When I or any other users tried to login, I wanted that the Login prompt should appear instead of the user list appearing by default.
In Cinnamon, you can change the login theme, It will still be GUI based though. Some login themes will show both the userlist and login box and others will show just the login box ( No User Lists ).
To access the login themes, click on Menu > Administration > Login Window and enter your sudo password.
A few themes for example, the Split, Wooden, and Simple themes show the login box. You enter the username and then the password.
You can preview the themes by clicking on the radio button next to the theme and then the gear icon on top. When you do this, the theme will appear in a new window. To close the theme, right-click on the theme name on the bottom taskbar and select close.
I'm not sure you can do this now because of your current situation but if you decide to re-install LM Cinnamon, this is how you can change the login theme.
Last edited by sounds greek 2 me; 12-14-2014 at 02:50 PM.
I wouldn't suggest to delete or modify /etc/password directly.You already ran into problem due to modifying it. There are few utilities to manage users (useradd, userdel, usermod, passwd and so on).
Before managing your users, boot into liveCD, mount your Mint partition and look at <mountpoint>/etc directory. There should be passwd backup file named as "passwd-" or "passwd.bak". System creates such a backup every time you using accounts managing tools. If so, copy it over your damaged passwd and try to reboot and log in.
But if you still want to modify it directly or delete it at all, you have to keep in mind that you shouldn't delete root user.
You might look there at linuxmint passwd sample: https://www.ibm.com/developerworks/c...iles19?lang=en
Quote:
Originally Posted by sounds greek 2 me
Don't feel bad. We all had our share of tweaking with our computers and operating systems, it's how we learn and experience is the best teacher with success and failures.
Awhile back, Leo Leporte who's been around computers and technology, messed up his ubuntu by following many suggestions from an IRC channel. His main OS of choice is Apple's IOS and maybe some windows. He dabbles with linux on a limited basis. As you can see, even a veteran computer user like Leo can make mistakes.
Good luck
Quote:
Originally Posted by sounds greek 2 me
In Cinnamon, you can change the login theme, It will still be GUI based though. Some login themes will show both the userlist and login box and others will show just the login box ( No User Lists ).
To access the login themes, click on Menu > Administration > Login Window and enter your sudo password.
A few themes for example, the Split, Wooden, and Simple themes show the login box. You enter the username and then the password.
You can preview the themes by clicking on the radio button next to the theme and then the gear icon on top. When you do this, the theme will appear in a new window. To close the theme, right-click on the theme name on the bottom taskbar and select close.
I'm not sure you can do this now because of your current situation but if you decide to re-install LM Cinnamon, this is how you can change the login theme.
Quote:
Originally Posted by jailbait
if you want to fix a user called joe then log in as root and type:
chown -R joe /home/joe
-----------
Steve Stites
Quote:
Originally Posted by John VV
change them BACK
some OS's use 1000 and UP !!!!
Other OS's use 500 and UP
on a 1000 and up you can NOT just arbitrarily change them
now
you can reset a 1000 system to use 500
or
reset a 500 system to use 1000
i do that for shared file permissions for the SAME user ( me) on opensuse and ScientificLinux on a shared drive
but ,you really can not go backwards on the id's
999
998
997
because ROOT user is 1000 OR 500
and the FIRST!!! NON ROOT user is 1001 or 501
and THAT 1001 or 501 is REQUIRED for sudo and for most things
Thank you for coming Teufel, sounds greek 2 me, Jailbait & John VV;
John VV that was a vital piece of information. Thanks for that.
I tried much but the issue was not resolved so as a last resort I backed up everything by logging in with Live USB and reinstalled the OS. But now I won't do anything without consulting you expert minds. Please guide me to customize my Login Screen.
Now that I am back to square-1, I want to customize my Login screen. Here below are my requirements;
1. I want to add a 'personal' Login background image.
2. I want the Login-screen to display a personalized message.
3. I don't want the Login-screen to display a list of usernames. [I haven't added any standard users yet. I am the root and the sole user now.]
4. I want the Login-screen to just prompt for entering the Login name and the password.
My system specifications: Samsung RV509, i3, 300GB HDD, 3GB Ram, Dual boot Windows7 & LM 17 cinnamon qiana.
These are my [fantacy?] requirements. Can these be accomplished? Could you please forgive my ignorance and kindly help me by giving a step by step guidance? I would be greatfull to you all lovely guys. Please help me customize my Login-screen.
Thank you & Regards.
Wish you all & LQ, a happy new year 2015.
Anil
Last edited by Anil Kagi; 12-31-2014 at 10:17 PM.
Reason: Typo
The problem I am trying to discuss here i.e. 'to customize my Login Screen' does not match the heading of this thread which I started actually to discuss the problem created while trying 'to customize my Login Screen'. So I think it would be wiser to start a new thread exclusively to discuss 'How to customize my Login Screen'. So I am starting a new thread here, regarding that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.