Corrupted /etc/shadow and /etc/passwd

gerwim

Verified User
Joined
May 12, 2006
Messages
11
Hi guys,

So I'm migrating from another server, and I even copied the shadow and passwd files without backupping them.

Stupid I know, either way, is there a way to repair these?
I tried “pwconv, grpconv and pwck” but no avail.

The problem is when I start DA, it says "Starting Directadmin" but not starting anything at all, previously I had the error that the user.conf could not be read, and all happened after replacing shadow and passwd.


Thanks!
 
Hello,

I don't know any way to repair those files. If you've got no backups, there is no way to restore them, of course if we talk about lost passwords, but not about other things like user's shell, homedir, uid, gid.
 
Hmm ok thanks. Is there a way for DirectAdmin to repair itself then? Since I think the problem is DirectAdmin cant start due to differences in uid or something, if that makes sense.
 
Nope, you should do it manually yourself, or ask somebody for a free or paid help. There's no script, which would fix /etc/shadow and /etc/passwd.

It's difficult to say anything more, when there is no any supposition on how much your files are corrupted.
 
Alright, thanks.

I'll be reinstalling my machine then (and this time creating a backup, ha).
 
If it's a problem of these two files only, you do not need to re-install OS. Provide us with your OS type and version. Somebody might want to share with part of these files, which does not include customer's informations.
 
I have already reinstalled it now.

It works. As I could take a quick look, the DirAdmin uid was 104 on my previous machine, but should have been 107 on my new machine.

Thanks anyway!
 
Back
Top