Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: AlexG on May 19, 2008, 10:55:00 AM

Title: /etc/passwd deleted
Post by: AlexG on May 19, 2008, 10:55:00 AM
Is there any way to rescue the system after deleting the /etc/passwd ?

With restarting the server it appears on the login prompt: bad user name www and I cannot logon via putty
Title: Re: /etc/passwd deleted
Post by: AlexG on May 19, 2008, 11:05:16 AM
Folowing error ocured: I was working on htaccess and followed the instructions:

Quote
<Directory /home/e-smith/files/ibays/ibayname/html/foldername/subfoldername>
AuthUserFile /etc/passwd
AuthGroupFile /dev/null
AuthName "name"
AuthType Basic
<Limit GET>
order deny,allow
require valid-user
</Limit>
</Directory>

expand-template /etc/httpd/conf/httpd.conf
sv t /service/httpd-e-smith

After that the server stopped to work. Now I cannot log on with putty on the console appears Bad user WWW .
I restarted theserver in single mode, tried to set admin and root again but the server says: unknown for both. But the passwd is still there.

Following appears also: (process:2299): Glib-CRITICAL **: file gtree.c: line 260 (g_tree_destroy): assertion 'tree != NULL' failed
(g_tree_traverse)


I am still in the single mode.
Any idea how to fix this?
Title: Re: /etc/passwd deleted
Post by: Stefano on May 19, 2008, 11:16:02 AM
Hi

where did you find the "instructions"?

are you trying to log on on console with user www?

Stefano
Title: Re: /etc/passwd deleted
Post by: AlexG on May 19, 2008, 11:18:31 AM
I found them here: http://wiki.contribs.org/Htaccess

No I do not try to logon. It appears automatically every second 'Bad user WWW'
Title: Re: /etc/passwd deleted
Post by: byte on May 19, 2008, 11:25:25 AM
Do you not have a backup ?
Title: Re: /etc/passwd deleted
Post by: AlexG on May 19, 2008, 11:27:47 AM
Hmmm no I do not have a backup.
Title: Re: /etc/passwd deleted
Post by: Stefano on May 19, 2008, 11:29:49 AM
I found them here: http://wiki.contribs.org/Htaccess

and you put /etc/passwd as your password file for http access? damn...

Quote
No I do not try to logon. It appears automatically every second 'Bad user WWW'

try to do an upgrade via the setup cd..
it might work.

Stefano
Title: Re: /etc/passwd deleted
Post by: AlexG on May 19, 2008, 11:34:42 AM
Do you mean there is an option with booting the cd?
Title: Re: /etc/passwd deleted
Post by: Stefano on May 19, 2008, 11:37:34 AM
yes

choose "upgrade" when requested.

Let us know.

ASAP I'll change the wiki..

Stefano
Title: Re: /etc/passwd deleted
Post by: mgic_box on May 19, 2008, 11:46:55 AM
yes

choose "upgrade" when requested.

Let us know.

ASAP I'll change the wiki..

Stefano


 EveryDay I like this kind of answ. people get on ths forum...!!!!

 AlexG:, You can always put another file "passwd" + "shadow" form another system.

  If you can not login, nor ftp to put there the files, you can always use a Linux Live BOOT CD/DVD os Disquete, There are varios on the net. Do a google serch.

 Put the SME recovery cd only updades, does nothing about missing files. AlexG: I now this, because I got the same kind of answ. on this forum, and did not helped.

 

Title: Re: /etc/passwd deleted
Post by: AlexG on May 19, 2008, 11:49:01 AM
The upgrade was very fast and nothing has changed. The services are starting with ok, but later : Bad user name www and I cannot logon.

When I start in single mode I do see the passwd.

What do you recommend?
Title: Re: /etc/passwd deleted
Post by: thomasch on May 19, 2008, 12:11:16 PM
AlexG,

There is passwd backup  in every SME server.

/etc/passwd-

boot into rescue mode and copy it to /etc/passwd


thomas
Title: Re: /etc/passwd deleted
Post by: AlexG on May 19, 2008, 12:18:51 PM
How do I get into this rescue? With the CD?
Title: Re: /etc/passwd deleted
Post by: byte on May 19, 2008, 12:30:15 PM
How do I get into this rescue? With the CD?

Type "sme rescue" when using the CD
Title: Re: /etc/passwd deleted
Post by: AlexG on May 19, 2008, 12:36:49 PM
Hi, I am now in the rescue mode and changed with 'chroot /mnt/sysimage'. I changed to /etc and tried to copy 'copy passwd- passwd'. It appears command not found.
Title: Re: /etc/passwd deleted
Post by: Stefano on May 19, 2008, 12:42:24 PM
hi..

cp, not copy
Title: Re: /etc/passwd deleted
Post by: AlexG on May 19, 2008, 12:58:39 PM
YOU SAVED MY LIFE! It works - Thank you very much for your help. I think it's better now to do a backup.

Best regards and best wishes
AlexG
Title: Re: /etc/passwd deleted
Post by: Stefano on May 19, 2008, 01:13:11 PM
Hi..

happy you are ok now..

hoping not to be misunderstood, please, read carefully the documentation, always make a backup of your server and, naturally, don't play with your production server..

vmware is your friend ;-)

Ciao
Stefano
Title: Re: /etc/passwd deleted
Post by: brianr on May 19, 2008, 03:15:58 PM
Sorry - too late! - Edited out the unnecessary comment.