Koozali.org: home of the SME Server

/etc/passwd deleted

Offline AlexG

  • ****
  • 110
  • +0/-0
/etc/passwd deleted
« 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

Offline AlexG

  • ****
  • 110
  • +0/-0
Re: /etc/passwd deleted
« Reply #1 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?
« Last Edit: May 19, 2008, 11:16:31 AM by AlexG »

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: /etc/passwd deleted
« Reply #2 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

Offline AlexG

  • ****
  • 110
  • +0/-0
Re: /etc/passwd deleted
« Reply #3 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'

Offline byte

  • *
  • 2,183
  • +2/-0
Re: /etc/passwd deleted
« Reply #4 on: May 19, 2008, 11:25:25 AM »
Do you not have a backup ?
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline AlexG

  • ****
  • 110
  • +0/-0
Re: /etc/passwd deleted
« Reply #5 on: May 19, 2008, 11:27:47 AM »
Hmmm no I do not have a backup.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: /etc/passwd deleted
« Reply #6 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

Offline AlexG

  • ****
  • 110
  • +0/-0
Re: /etc/passwd deleted
« Reply #7 on: May 19, 2008, 11:34:42 AM »
Do you mean there is an option with booting the cd?

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: /etc/passwd deleted
« Reply #8 on: May 19, 2008, 11:37:34 AM »
yes

choose "upgrade" when requested.

Let us know.

ASAP I'll change the wiki..

Stefano

Offline mgic_box

  • ***
  • 52
  • +0/-0
Re: /etc/passwd deleted
« Reply #9 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.

 


Offline AlexG

  • ****
  • 110
  • +0/-0
Re: /etc/passwd deleted
« Reply #10 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?
« Last Edit: May 19, 2008, 12:08:07 PM by AlexG »

Offline thomasch

  • *
  • 232
  • +0/-0
Re: /etc/passwd deleted
« Reply #11 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

Offline AlexG

  • ****
  • 110
  • +0/-0
Re: /etc/passwd deleted
« Reply #12 on: May 19, 2008, 12:18:51 PM »
How do I get into this rescue? With the CD?

Offline byte

  • *
  • 2,183
  • +2/-0
Re: /etc/passwd deleted
« Reply #13 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
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline AlexG

  • ****
  • 110
  • +0/-0
Re: /etc/passwd deleted
« Reply #14 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.