(Solved) All accounts are disabled upon reboot?

If none of the more specific forums is the right place to ask

(Solved) All accounts are disabled upon reboot?

Postby theglitch » 2017-05-09 10:40

UPDATE: It was a wrong character in the /etc/passwd file

---------
Hi all

I'd really like to have your advice. I'm pretty lost here.

I have a Linode debian installation that I was tinkering with for the last months. It was working and all, until yesterday when I couldn't log in to any of the users no more. They were all disabled and I had to unlock + change their password. I'm not sure what caused it. The things I did just before:
1. Tried to chown/var/www/ to www-data
2. in /etc/passwd, edited to this line "www-data:x:33:33:www-data:/var/www:/bin/bash", so I can open the shell
=>
1. Chronologically, as soon as I did it, I couldn't use the users no more
2. Using Lish, I could find out that the root/www-data/any new user I opened were locked out as soon as I rebooted the machine
3. Moreover, some of the directories are not visible to me, no more, like "/var/www/" when accessed via root (so, maybe the user altogether restored to some initial state?)
4. SSH keys are lost after reboot - the ~/.ssh/authorized_keys is empty again
5. Oh, and the sites still work.. meaning the files and stuff are still there

----
Some mounting information:
Filesystem Type Size Used Avail Use% Mounted on
tmpfs tmpfs 1.6G 1.1M 1.6G 1% /media/ramdisk
/dev/sdh iso9660 160M 160M 0 100% /media/sdh
/dev/loop0 squashfs 146M 146M 0 100% /media/compressed_root
unionfs overlay 1.6G 1.1M 1.6G 1% /
none proc 0 0 0 - /proc
none sysfs 0 0 0 - /sys
devtmpfs devtmpfs 10M 0 10M 0% /dev
devpts devpts 0 0 0 - /dev/pts
root@ttyS0:~# ^C


All seems like there is some reset/new user process happening whenever I reboot the system

Please help!

Thanks in advance!
Last edited by theglitch on 2017-05-10 10:09, edited 1 time in total.
theglitch
 
Posts: 5
Joined: 2017-05-09 08:13

Re: All accounts are disabled upon reboot?

Postby dasein » 2017-05-09 14:48

theglitch wrote:I have a Linode debian installation...

You're asking volunteers to provide free tech support for a paid commercial service?

What an interesting business model Linode seems to have: deploy FOSS, charge money but provide no tech support, refer folks to distro forums for assistance.

Image

Even if someone were willing to support Linode for free, no one here knows how Linode configures their servers. If you can reproduce your problem(s) on a stock Debian install, be sure to post back. Otherwise, maybe reconsider your choice of hosting providers; as they say in Spanish, "Lo barato sale caro."
User avatar
dasein
 
Posts: 7378
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: All accounts are disabled upon reboot?

Postby theglitch » 2017-05-09 15:37

Thanks

Yes, I was asking for a tech support. I thought it could be a more general issue - at least somewhat. I change the root password and unlock it, and after reboot it's locked again
Didn't make the connection to a commercial hosting service, actually
What would you recommend as a hosting ?


Thanks
theglitch
 
Posts: 5
Joined: 2017-05-09 08:13

Re: All accounts are disabled upon reboot?

Postby GarryRicketson » 2017-05-09 16:17

by theglitch » It was working and all,

But , you kept "tinkering" ,
by theglitch » I was tinkering with for the last months.
until you broke it. One option would be to use the back up you made before you started "tinkering", when it was still working .
Or
1. Tried to chown/var/www/ to www-data
2. in /etc/passwd, edited to this line "www-data:x:33:33:www-data:/var/www:/bin/bash", so I can open the shell
=>
1. Chronologically, as soon as I did it, I couldn't use the users no more

Restore the owner ship to what ever it was originally,..
Using the back up you made, before editing the "passwd" file, replace it with the original.
If and when you get back to it's original state, which was working, stop "tinkering",...if it works don't try to fix it.

by theglitch »What would you recommend as a hosting ?

NO, that is not the purpose of this forum, The forum:
Debian User Forums
Is not for promoting or recommending any hosting services, commercial or free,
Posts recommending or promoting commercial hosting services will be considered spam.

I see the "linode" site does have documentation on the back ups. I am not posting the link though, the OP can browse their support documentation if need be. It is under :
Code: Select all
/docs/security/backups/backing-up-your-data

Now that you’ve set up your Linode and uploaded content, you’ll want to start backing up your data so you don’t lose your work. The data stored on your Linode can become corrupted or inaccessible for any number of reasons - accidental deletions, misconfigurations, hacking, or even software updates that don’t play nicely with the rest of your configuration. Having a recent backup on hand will turn a major headache into “Oops. Undo.”
User avatar
GarryRicketson
 
Posts: 3868
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: All accounts are disabled upon reboot?

Postby theglitch » 2017-05-09 16:31

Thanks

But, you know, I'm just starting. Got a basic VPS and was trying to understand what's going on. So although I understand your points, what's with being mad at people?
And yes, ofcourse I broke it.
theglitch
 
Posts: 5
Joined: 2017-05-09 08:13

Re: All accounts are disabled upon reboot?

Postby GarryRicketson » 2017-05-09 17:31

by theglitch » what's with being mad at people?

Who is "mad at people" ?
My apology if I said something that makes it sound like I am "mad" or angry,..
I am not angry at all , in any way.

1. Tried to chown/var/www/ to www-data

But I do not know who used to be the "owner" of /var/www/
only you can know that. The solution is simple, change the ownership
back to the way it was.
The same here:
2. in /etc/passwd, edited to this line "www-data:x:33:33:www-data:/var/www:/bin/bash", so I can open the shell

1. Chronologically, as soon as I did it, I couldn't use the users no more

So any way, it is clear, the changes you made , have caused the problem,..

Since I have no idea as to what the original line was, it is you and only you
that can know that, either by remembering, or check the copy you made, before
you edited it,...
I am sorry, if you did not think to make a copy , before editing it,
But, you know, I'm just starting.

Well, yes, we can see that, but I still do not understand why copies were not made,...I mean even when I first started using Dos 1.1, and had no clue as to what I was doing, I all ways made a copy of any file, before modifying it,...my memory just is not that good,
Making back ups is standard and one of the first things to be done, ...but I guess you did not know that either,...any way, nobody is angry, or at least not me, and I am sorry this has happened. If you do not have a back up made, and can not remember what the original permission were, ownership, etc. I don't know
how to repair this,.. what you need to do is change the things back to what was
working,...
Sometimes, in the /etc/ where you edited the passwd file, sometimes
there is a saved copy , it might be ~passwd or something like that,..

Tried to chown/var/www/ to www-data

Exactly how did you do that,? ...use code boxes,..like you show here, would not have worked any way,..
see :
Code: Select all
man chown

It would have been something like:
Code: Select all
chown www-data /var/www

On many systems, normally by default /var/www is owned by root.
But that is not going to help on the passwd file you edited,..
And nobody here can guess what it was before,..
See:
Code: Select all
man passwd
User avatar
GarryRicketson
 
Posts: 3868
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: All accounts are disabled upon reboot?

Postby Bulkley » 2017-05-09 17:40

So far this really doesn't lo9ok like a Debian problem. Fortunately, Linode has a Forum. Maybe someone over there has an answer.
Bulkley
 
Posts: 5103
Joined: 2006-02-11 18:35

Re: All accounts are disabled upon reboot?

Postby debiman » 2017-05-09 18:06

theglitch wrote:But, you know, I'm just starting.

i think the key is you editing /etc/passwd.
can you undo that? or have you locked yourself out?
if you did lock yourself out, well, tell linode that you need to start from zero (maybe you can even get the data back).
User avatar
debiman
 
Posts: 974
Joined: 2013-03-12 07:18

Re: All accounts are disabled upon reboot?

Postby Dai_trying » 2017-05-09 19:19

theglitch wrote:2. in /etc/passwd, edited to this line "www-data:x:33:33:www-data:/var/www:/bin/bash", so I can open the shell

I think this is what you did wrong, simply change it back and see if that helps.
Dai_trying
 
Posts: 191
Joined: 2016-01-07 12:25

Re: All accounts are disabled upon reboot?

Postby theglitch » 2017-05-09 23:39

Thanks all

Indeed, it seems that I entered a wrong character in the passwd file :\ didn't see before. Should have calmed down and give it a thought

Thanks all, really appreciate your effort and time
theglitch
 
Posts: 5
Joined: 2017-05-09 08:13

Re: All accounts are disabled upon reboot?

Postby GarryRicketson » 2017-05-10 01:27

Well , any way, that is good news, Did that fix it ?
If it did, you can edit the first post, subject line, add solved to it:
example:
Code: Select all
(solved)All accounts are disabled upon reboot?


For the future, it would be to your advantage to start using the back up
features they offer, you never know what can go wrong, anything from a
"typo", to disk failure, but any way good to hear you found the mistake.
User avatar
GarryRicketson
 
Posts: 3868
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: All accounts are disabled upon reboot?

Postby theglitch » 2017-05-10 10:08

GarryRicketson wrote:
For the future, it would be to your advantage to start using the back up
features they offer, you never know what can go wrong, anything from a
"typo", to disk failure, but any way good to hear you found the mistake.


Thanks. I actually have my own backups, but I wanted to know what happened.. still new to Linux and I thought it could be something bigger than this character
Thanks!
theglitch
 
Posts: 5
Joined: 2017-05-09 08:13


Return to General Questions

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable